Skip to content

Commit 85b10b0

Browse files
author
Jim Miller
committed
Fix 5317948: Don't display facelock when transport controls are showing.
Change-Id: I0061fa9ec184846b0ed82c977a2e48b36cb079af
1 parent a11630f commit 85b10b0

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ public void requestHide(View view) {
231231
}
232232
};
233233

234+
private TransportControlView mTransportControlView;
235+
234236
/**
235237
* @return Whether we are stuck on the lock screen because the sim is
236238
* missing.
@@ -516,7 +518,10 @@ public void onScreenTurnedOn() {
516518

517519
// When screen is turned on, need to bind to FaceLock service if we are using FaceLock
518520
// But only if not dealing with a call
519-
if (mUpdateMonitor.getPhoneState() == TelephonyManager.CALL_STATE_IDLE) {
521+
final boolean transportInvisible = mTransportControlView == null ? true :
522+
mTransportControlView.getVisibility() != View.VISIBLE;
523+
if (mUpdateMonitor.getPhoneState() == TelephonyManager.CALL_STATE_IDLE
524+
&& transportInvisible) {
520525
bindToFaceLock();
521526
} else {
522527
mHandler.sendEmptyMessage(MSG_HIDE_FACELOCK_AREA_VIEW);
@@ -805,14 +810,13 @@ View createUnlockScreenFor(UnlockMode unlockMode) {
805810
}
806811

807812
private void initializeTransportControlView(View view) {
808-
com.android.internal.widget.TransportControlView tcv =
809-
(TransportControlView) view.findViewById(R.id.transport);
810-
if (tcv == null) {
813+
mTransportControlView = (TransportControlView) view.findViewById(R.id.transport);
814+
if (mTransportControlView == null) {
811815
if (DEBUG) Log.w(TAG, "Couldn't find transport control widget");
812816
} else {
813817
mUpdateMonitor.reportClockVisible(true);
814-
tcv.setVisibility(View.GONE); // hide tcv until we get the callback below to show it.
815-
tcv.setCallback(mWidgetCallback);
818+
mTransportControlView.setVisibility(View.GONE); // hide until it requests being shown.
819+
mTransportControlView.setCallback(mWidgetCallback);
816820
}
817821
}
818822

0 commit comments

Comments
 (0)