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

Commit 8bf7f033 authored by Beverly Tai's avatar Beverly Tai Committed by Automerger Merge Worker
Browse files

Merge "Update DisabledUdfpsCtrl to LockIconViewController" into sc-dev am: 3d7e144b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14116372

Change-Id: I7e09d56a6447598d9f01f9e0ff3fb1b5d7df1edd
parents 0ca8e484 3d7e144b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -112,4 +112,9 @@
        android:layout_width="match_parent" />

    <include layout="@layout/status_bar_expanded_plugin_frame"/>

    <com.android.keyguard.LockIconView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/lock_icon_view" />
</com.android.systemui.statusbar.phone.NotificationPanelView>
+3 −13
Original line number Diff line number Diff line
@@ -80,23 +80,13 @@
        sysui:ignoreRightInset="true"
    />

    <LinearLayout
        android:id="@+id/lock_icon_container"
        android:orientation="vertical"
    <!-- Keyguard messages -->
    <FrameLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/status_bar_height"
        android:layout_gravity="top|center_horizontal"
        android:gravity="center_horizontal">
        <com.android.systemui.statusbar.phone.LockIcon
            android:id="@+id/lock_icon"
            android:layout_width="@dimen/keyguard_lock_width"
            android:layout_height="@dimen/keyguard_lock_height"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="@dimen/keyguard_lock_padding"
            android:contentDescription="@string/accessibility_unlock_button"
            android:src="@*android:drawable/ic_lock"
            android:scaleType="center" />
        <com.android.keyguard.KeyguardMessageArea
            android:id="@+id/keyguard_message_area"
            style="@style/Keyguard.TextView"
@@ -107,7 +97,7 @@
            android:singleLine="true"
            android:ellipsize="marquee"
            android:focusable="true" />
    </LinearLayout>
    </FrameLayout>

    <com.android.systemui.biometrics.AuthRippleView
        android:id="@+id/auth_ripple"
+7 −0
Original line number Diff line number Diff line
@@ -649,4 +649,11 @@
        <!-- sensorLocationY -->
        <!--sensorRadius -->
    </integer-array>

    <!-- The properties of the lock icon in pixels. -->
    <integer-array name="config_lock_icon_props">
        <!-- X -->
        <!-- Y -->
        <!-- radius -->
    </integer-array>
</resources>
+15 −13
Original line number Diff line number Diff line
@@ -315,6 +315,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
    private boolean mLogoutEnabled;
    // cached value to avoid IPCs
    private boolean mIsUdfpsEnrolled;
    private boolean mIsFaceEnrolled;
    // If the user long pressed the lock icon, disabling face auth for the current session.
    private boolean mLockIconPressed;
    private int mActiveMobileDataSubscription = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
@@ -1944,15 +1945,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
        mIsUdfpsEnrolled = mAuthController.isUdfpsEnrolled(userId);
    }

    /**
     * Whether to show the lock icon on lock screen and bouncer.
     */
    public boolean canShowLockIcon() {
        if (mLockScreenMode == LOCK_SCREEN_MODE_LAYOUT_1) {
            return isFaceAuthEnabledForUser(KeyguardUpdateMonitor.getCurrentUser())
                    && !isUdfpsEnrolled();
        }
        return true;
    private void updateFaceEnrolled(int userId) {
        mIsFaceEnrolled = whitelistIpcs(
                () -> mFaceManager != null && mFaceManager.isHardwareDetected()
                        && mFaceManager.hasEnrolledTemplates(userId)
                        && mFaceSettingEnabledForUser.get(userId));
    }

    /**
@@ -1962,6 +1959,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
        return mIsUdfpsEnrolled;
    }

    /**
     * @return true if there's at least one face enrolled
     */
    public boolean isFaceEnrolled() {
        return mIsFaceEnrolled;
    }

    private final UserSwitchObserver mUserSwitchObserver = new UserSwitchObserver() {
        @Override
        public void onUserSwitching(int newUserId, IRemoteCallback reply) {
@@ -2279,10 +2283,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
     * If face hardware is available, user has enrolled and enabled auth via setting.
     */
    public boolean isFaceAuthEnabledForUser(int userId) {
        // TODO(b/140034352)
        return whitelistIpcs(() -> mFaceManager != null && mFaceManager.isHardwareDetected()
                && mFaceManager.hasEnrolledTemplates(userId)
                && mFaceSettingEnabledForUser.get(userId));
        updateFaceEnrolled(userId);
        return mIsFaceEnrolled;
    }

    private void stopListeningForFingerprint() {
+1 −2
Original line number Diff line number Diff line
@@ -182,7 +182,6 @@ public interface KeyguardViewController {
     * @param container
     * @param notificationPanelViewController
     * @param biometricUnlockController
     * @param lockIconContainer
     * @param notificationContainer
     * @param bypassController
     */
@@ -190,6 +189,6 @@ public interface KeyguardViewController {
            ViewGroup container,
            NotificationPanelViewController notificationPanelViewController,
            BiometricUnlockController biometricUnlockController,
            ViewGroup lockIconContainer, View notificationContainer,
            View notificationContainer,
            KeyguardBypassController bypassController);
}
Loading