equal
deleted
inserted
replaced
64 public static void deactivate(Remote remote, |
64 public static void deactivate(Remote remote, |
65 ActivationID id) { |
65 ActivationID id) { |
66 // We do as much as 50 deactivation trials, each separated by |
66 // We do as much as 50 deactivation trials, each separated by |
67 // at least 100 milliseconds sleep time (max sleep time of 5 secs). |
67 // at least 100 milliseconds sleep time (max sleep time of 5 secs). |
68 final long deactivateSleepTime = 100; |
68 final long deactivateSleepTime = 100; |
69 for (int i = 0; i < 50; i ++) { |
69 long stopTime = System.currentTimeMillis() + deactivateSleepTime * 50; |
|
70 while (System.currentTimeMillis() < stopTime) { |
70 try { |
71 try { |
71 if (Activatable.inactive(id) == true) { |
72 if (Activatable.inactive(id) == true) { |
72 mesg("inactive successful"); |
73 mesg("inactive successful"); |
73 return; |
74 return; |
74 } else { |
75 } else { |