Stop FaceUnlock when detached from window fixes b/7222226
The FaceUnlock service gets onConfigurationChanged at about the same time as onDetachedFromWindow is received by the KeyguardFaceUnlockView, so we could do something beyond hiding the window there, but this approach should operate on the same thread as onPause and onResume, and thus be safe against threading issues. Before this change, I was seeing startUi calls in FaceUnlock.java crashing the service because the ProcessingThread had already been set to null. After this change, onDetachedFromWindow gets called, followed by onPause, after a rotation. The onDetachedFromWindow call now clears the messages and shuts down the connection, which prevents the startUi call. We should also probably make sure startUi in the service exits if mThread is null for good measure. Change-Id: I083066c9cb210e398d911e70c0f3bb5d2736cd8d
Loading
Please register or sign in to comment