Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40f2cacb authored by Hung-ying Tyan's avatar Hung-ying Tyan
Browse files

Merge "SipService: release wake lock for cancelled tasks."

Bug: 3327004
Change-Id: Ice47f973b5f2969f26eaa83a3e4795b2e153ba8b
parent 9d0577ec
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;