diff options
-rw-r--r-- | voip/java/com/android/server/sip/SipService.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/voip/java/com/android/server/sip/SipService.java b/voip/java/com/android/server/sip/SipService.java index 3af6e78..8945d1e 100644 --- a/voip/java/com/android/server/sip/SipService.java +++ b/voip/java/com/android/server/sip/SipService.java @@ -1055,7 +1055,10 @@ public final class SipService extends ISipService.Stub { // we want to skip the interim ones) but deliver bad news // immediately if (connected) { - if (mTask != null) mTask.cancel(); + if (mTask != null) { + mTask.cancel(); + mMyWakeLock.release(mTask); + } mTask = new MyTimerTask(type, connected); mTimer.schedule(mTask, 2 * 1000L); // hold wakup lock so that we can finish changes before the @@ -1096,6 +1099,7 @@ public final class SipService extends ISipService.Stub { if (mTask != this) { Log.w(TAG, " unexpected task: " + mNetworkType + (mConnected ? " CONNECTED" : "DISCONNECTED")); + mMyWakeLock.release(this); return; } mTask = null; |