summaryrefslogtreecommitdiffstats
path: root/voip/java/com
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2011-01-06 13:03:30 +0800
committerHung-ying Tyan <tyanh@google.com>2011-01-06 13:05:29 +0800
commit0c01e6e060d079b0a25a44c1159db63944afce17 (patch)
tree3d3f0fd6592051c315f1805d0a942f5c1aeecc93 /voip/java/com
parentb5a8654dea9ea8443b41f8ff3668ae4074e13a07 (diff)
downloadframeworks_base-0c01e6e060d079b0a25a44c1159db63944afce17.zip
frameworks_base-0c01e6e060d079b0a25a44c1159db63944afce17.tar.gz
frameworks_base-0c01e6e060d079b0a25a44c1159db63944afce17.tar.bz2
SipService: release wake lock for cancelled tasks.
Bug: 3327004 Change-Id: I0691cd70edf61f815ecb0613aca85babd89f6cc4
Diffstat (limited to 'voip/java/com')
-rw-r--r--voip/java/com/android/server/sip/SipService.java6
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;