Skip to content

Commit 025fb93

Browse files
author
Steven Ross
committed
Clearing connected message in stop fixes 7401152
We can stop before the service connected message is processed, in which case we should clear the message. Otherwise it can cause us to start up the UI before the camera is open, causing a crash. I was unable to reproduce this issue, but it theoretically will happen, and the bug report shows all the symptoms of this series of events. Change-Id: I60d295883b08ac58ccf0f3fc6d152b8b75fe9b18
1 parent d812e7a commit 025fb93

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ public boolean stop() {
149149
Log.e(TAG, "stop() called from non-UI thread");
150150
}
151151

152+
// Clearing any old service connected messages.
153+
mHandler.removeMessages(MSG_SERVICE_CONNECTED);
154+
152155
boolean mWasRunning = mIsRunning;
153156

154157
stopUi();

0 commit comments

Comments
 (0)