Loading telephony/java/com/android/internal/telephony/cdma/CdmaConnection.java +22 −10 Original line number Original line Diff line number Diff line Loading @@ -592,9 +592,12 @@ public class CdmaConnection extends Connection { if (!isIncoming) { if (!isIncoming) { // outgoing calls only // outgoing calls only processNextPostDialChar(); processNextPostDialChar(); } } else { // Only release wake lock for incoming calls, for outgoing calls the wake lock // will be released after any pause-dial is completed releaseWakeLock(); releaseWakeLock(); } } } private void private void doDisconnect() { doDisconnect() { Loading Loading @@ -688,6 +691,7 @@ public class CdmaConnection extends Connection { Registrant postDialHandler; Registrant postDialHandler; if (postDialState == PostDialState.CANCELLED) { if (postDialState == PostDialState.CANCELLED) { releaseWakeLock(); //Log.v("CDMA", "##### processNextPostDialChar: postDialState == CANCELLED, bail"); //Log.v("CDMA", "##### processNextPostDialChar: postDialState == CANCELLED, bail"); return; return; } } Loading @@ -696,6 +700,9 @@ public class CdmaConnection extends Connection { postDialString.length() <= nextPostDialChar) { postDialString.length() <= nextPostDialChar) { setPostDialState(PostDialState.COMPLETE); setPostDialState(PostDialState.COMPLETE); // We were holding a wake lock until pause-dial was complete, so give it up now releaseWakeLock(); // notifyMessage.arg1 is 0 on complete // notifyMessage.arg1 is 0 on complete c = 0; c = 0; } else { } else { Loading Loading @@ -770,19 +777,24 @@ public class CdmaConnection extends Connection { } } /** /** * Set post dial state and acquire wake lock while switching to "started" * Set post dial state and acquire wake lock while switching to "started" or "wait" * state, the wake lock will be released if state switches out of "started" * state, the wake lock will be released if state switches out of "started" or "wait" * state or after WAKE_LOCK_TIMEOUT_MILLIS. * state or after WAKE_LOCK_TIMEOUT_MILLIS. * @param s new PostDialState * @param s new PostDialState */ */ private void setPostDialState(PostDialState s) { private void setPostDialState(PostDialState s) { if (postDialState != PostDialState.STARTED if (s == PostDialState.STARTED || && s == PostDialState.STARTED) { s == PostDialState.PAUSE) { synchronized (mPartialWakeLock) { if (mPartialWakeLock.isHeld()) { h.removeMessages(EVENT_WAKE_LOCK_TIMEOUT); } else { acquireWakeLock(); acquireWakeLock(); } Message msg = h.obtainMessage(EVENT_WAKE_LOCK_TIMEOUT); Message msg = h.obtainMessage(EVENT_WAKE_LOCK_TIMEOUT); h.sendMessageDelayed(msg, WAKE_LOCK_TIMEOUT_MILLIS); h.sendMessageDelayed(msg, WAKE_LOCK_TIMEOUT_MILLIS); } else if (postDialState == PostDialState.STARTED } && s != PostDialState.STARTED) { } else { h.removeMessages(EVENT_WAKE_LOCK_TIMEOUT); h.removeMessages(EVENT_WAKE_LOCK_TIMEOUT); releaseWakeLock(); releaseWakeLock(); } } Loading Loading
telephony/java/com/android/internal/telephony/cdma/CdmaConnection.java +22 −10 Original line number Original line Diff line number Diff line Loading @@ -592,9 +592,12 @@ public class CdmaConnection extends Connection { if (!isIncoming) { if (!isIncoming) { // outgoing calls only // outgoing calls only processNextPostDialChar(); processNextPostDialChar(); } } else { // Only release wake lock for incoming calls, for outgoing calls the wake lock // will be released after any pause-dial is completed releaseWakeLock(); releaseWakeLock(); } } } private void private void doDisconnect() { doDisconnect() { Loading Loading @@ -688,6 +691,7 @@ public class CdmaConnection extends Connection { Registrant postDialHandler; Registrant postDialHandler; if (postDialState == PostDialState.CANCELLED) { if (postDialState == PostDialState.CANCELLED) { releaseWakeLock(); //Log.v("CDMA", "##### processNextPostDialChar: postDialState == CANCELLED, bail"); //Log.v("CDMA", "##### processNextPostDialChar: postDialState == CANCELLED, bail"); return; return; } } Loading @@ -696,6 +700,9 @@ public class CdmaConnection extends Connection { postDialString.length() <= nextPostDialChar) { postDialString.length() <= nextPostDialChar) { setPostDialState(PostDialState.COMPLETE); setPostDialState(PostDialState.COMPLETE); // We were holding a wake lock until pause-dial was complete, so give it up now releaseWakeLock(); // notifyMessage.arg1 is 0 on complete // notifyMessage.arg1 is 0 on complete c = 0; c = 0; } else { } else { Loading Loading @@ -770,19 +777,24 @@ public class CdmaConnection extends Connection { } } /** /** * Set post dial state and acquire wake lock while switching to "started" * Set post dial state and acquire wake lock while switching to "started" or "wait" * state, the wake lock will be released if state switches out of "started" * state, the wake lock will be released if state switches out of "started" or "wait" * state or after WAKE_LOCK_TIMEOUT_MILLIS. * state or after WAKE_LOCK_TIMEOUT_MILLIS. * @param s new PostDialState * @param s new PostDialState */ */ private void setPostDialState(PostDialState s) { private void setPostDialState(PostDialState s) { if (postDialState != PostDialState.STARTED if (s == PostDialState.STARTED || && s == PostDialState.STARTED) { s == PostDialState.PAUSE) { synchronized (mPartialWakeLock) { if (mPartialWakeLock.isHeld()) { h.removeMessages(EVENT_WAKE_LOCK_TIMEOUT); } else { acquireWakeLock(); acquireWakeLock(); } Message msg = h.obtainMessage(EVENT_WAKE_LOCK_TIMEOUT); Message msg = h.obtainMessage(EVENT_WAKE_LOCK_TIMEOUT); h.sendMessageDelayed(msg, WAKE_LOCK_TIMEOUT_MILLIS); h.sendMessageDelayed(msg, WAKE_LOCK_TIMEOUT_MILLIS); } else if (postDialState == PostDialState.STARTED } && s != PostDialState.STARTED) { } else { h.removeMessages(EVENT_WAKE_LOCK_TIMEOUT); h.removeMessages(EVENT_WAKE_LOCK_TIMEOUT); releaseWakeLock(); releaseWakeLock(); } } Loading