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

Commit 85b10b0d authored by Jim Miller's avatar Jim Miller
Browse files

Fix 5317948: Don't display facelock when transport controls are showing.

Change-Id: I0061fa9ec184846b0ed82c977a2e48b36cb079af
parent a11630fc
Loading
Loading
Loading
Loading
+10 −6
Original line number Original line Diff line number Diff line
@@ -231,6 +231,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
        }
        }
    };
    };


    private TransportControlView mTransportControlView;

    /**
    /**
     * @return Whether we are stuck on the lock screen because the sim is
     * @return Whether we are stuck on the lock screen because the sim is
     *   missing.
     *   missing.
@@ -516,7 +518,10 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler


        // When screen is turned on, need to bind to FaceLock service if we are using FaceLock
        // When screen is turned on, need to bind to FaceLock service if we are using FaceLock
        // But only if not dealing with a call
        // But only if not dealing with a call
        if (mUpdateMonitor.getPhoneState() == TelephonyManager.CALL_STATE_IDLE) {
        final boolean transportInvisible = mTransportControlView == null ? true :
                mTransportControlView.getVisibility() != View.VISIBLE;
        if (mUpdateMonitor.getPhoneState() == TelephonyManager.CALL_STATE_IDLE
                && transportInvisible) {
            bindToFaceLock();
            bindToFaceLock();
        } else {
        } else {
            mHandler.sendEmptyMessage(MSG_HIDE_FACELOCK_AREA_VIEW);
            mHandler.sendEmptyMessage(MSG_HIDE_FACELOCK_AREA_VIEW);
@@ -805,14 +810,13 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
    }
    }


    private void initializeTransportControlView(View view) {
    private void initializeTransportControlView(View view) {
        com.android.internal.widget.TransportControlView tcv =
        mTransportControlView = (TransportControlView) view.findViewById(R.id.transport);
                (TransportControlView) view.findViewById(R.id.transport);
        if (mTransportControlView == null) {
        if (tcv == null) {
            if (DEBUG) Log.w(TAG, "Couldn't find transport control widget");
            if (DEBUG) Log.w(TAG, "Couldn't find transport control widget");
        } else {
        } else {
            mUpdateMonitor.reportClockVisible(true);
            mUpdateMonitor.reportClockVisible(true);
            tcv.setVisibility(View.GONE); // hide tcv until we get the callback below to show it.
            mTransportControlView.setVisibility(View.GONE); // hide until it requests being shown.
            tcv.setCallback(mWidgetCallback);
            mTransportControlView.setCallback(mWidgetCallback);
        }
        }
    }
    }