Loading packages/SystemUI/res/layout/status_bar_expanded.xml +5 −0 Original line number Original line Diff line number Diff line Loading @@ -112,4 +112,9 @@ android:layout_width="match_parent" /> android:layout_width="match_parent" /> <include layout="@layout/status_bar_expanded_plugin_frame"/> <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> </com.android.systemui.statusbar.phone.NotificationPanelView> packages/SystemUI/res/layout/super_notification_shade.xml +3 −13 Original line number Original line Diff line number Diff line Loading @@ -80,23 +80,13 @@ sysui:ignoreRightInset="true" sysui:ignoreRightInset="true" /> /> <LinearLayout <!-- Keyguard messages --> android:id="@+id/lock_icon_container" <FrameLayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/status_bar_height" android:layout_marginTop="@dimen/status_bar_height" android:layout_gravity="top|center_horizontal" android:layout_gravity="top|center_horizontal" android:gravity="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 <com.android.keyguard.KeyguardMessageArea android:id="@+id/keyguard_message_area" android:id="@+id/keyguard_message_area" style="@style/Keyguard.TextView" style="@style/Keyguard.TextView" Loading @@ -107,7 +97,7 @@ android:singleLine="true" android:singleLine="true" android:ellipsize="marquee" android:ellipsize="marquee" android:focusable="true" /> android:focusable="true" /> </LinearLayout> </FrameLayout> <com.android.systemui.biometrics.AuthRippleView <com.android.systemui.biometrics.AuthRippleView android:id="@+id/auth_ripple" android:id="@+id/auth_ripple" Loading packages/SystemUI/res/values/config.xml +7 −0 Original line number Original line Diff line number Diff line Loading @@ -649,4 +649,11 @@ <!-- sensorLocationY --> <!-- sensorLocationY --> <!--sensorRadius --> <!--sensorRadius --> </integer-array> </integer-array> <!-- The properties of the lock icon in pixels. --> <integer-array name="config_lock_icon_props"> <!-- X --> <!-- Y --> <!-- radius --> </integer-array> </resources> </resources> packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +15 −13 Original line number Original line Diff line number Diff line Loading @@ -315,6 +315,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab private boolean mLogoutEnabled; private boolean mLogoutEnabled; // cached value to avoid IPCs // cached value to avoid IPCs private boolean mIsUdfpsEnrolled; private boolean mIsUdfpsEnrolled; private boolean mIsFaceEnrolled; // If the user long pressed the lock icon, disabling face auth for the current session. // If the user long pressed the lock icon, disabling face auth for the current session. private boolean mLockIconPressed; private boolean mLockIconPressed; private int mActiveMobileDataSubscription = SubscriptionManager.INVALID_SUBSCRIPTION_ID; private int mActiveMobileDataSubscription = SubscriptionManager.INVALID_SUBSCRIPTION_ID; Loading Loading @@ -1944,15 +1945,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mIsUdfpsEnrolled = mAuthController.isUdfpsEnrolled(userId); mIsUdfpsEnrolled = mAuthController.isUdfpsEnrolled(userId); } } /** private void updateFaceEnrolled(int userId) { * Whether to show the lock icon on lock screen and bouncer. mIsFaceEnrolled = whitelistIpcs( */ () -> mFaceManager != null && mFaceManager.isHardwareDetected() public boolean canShowLockIcon() { && mFaceManager.hasEnrolledTemplates(userId) if (mLockScreenMode == LOCK_SCREEN_MODE_LAYOUT_1) { && mFaceSettingEnabledForUser.get(userId)); return isFaceAuthEnabledForUser(KeyguardUpdateMonitor.getCurrentUser()) && !isUdfpsEnrolled(); } return true; } } /** /** Loading @@ -1962,6 +1959,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab return mIsUdfpsEnrolled; return mIsUdfpsEnrolled; } } /** * @return true if there's at least one face enrolled */ public boolean isFaceEnrolled() { return mIsFaceEnrolled; } private final UserSwitchObserver mUserSwitchObserver = new UserSwitchObserver() { private final UserSwitchObserver mUserSwitchObserver = new UserSwitchObserver() { @Override @Override public void onUserSwitching(int newUserId, IRemoteCallback reply) { public void onUserSwitching(int newUserId, IRemoteCallback reply) { Loading Loading @@ -2279,10 +2283,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab * If face hardware is available, user has enrolled and enabled auth via setting. * If face hardware is available, user has enrolled and enabled auth via setting. */ */ public boolean isFaceAuthEnabledForUser(int userId) { public boolean isFaceAuthEnabledForUser(int userId) { // TODO(b/140034352) updateFaceEnrolled(userId); return whitelistIpcs(() -> mFaceManager != null && mFaceManager.isHardwareDetected() return mIsFaceEnrolled; && mFaceManager.hasEnrolledTemplates(userId) && mFaceSettingEnabledForUser.get(userId)); } } private void stopListeningForFingerprint() { private void stopListeningForFingerprint() { Loading packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -182,7 +182,6 @@ public interface KeyguardViewController { * @param container * @param container * @param notificationPanelViewController * @param notificationPanelViewController * @param biometricUnlockController * @param biometricUnlockController * @param lockIconContainer * @param notificationContainer * @param notificationContainer * @param bypassController * @param bypassController */ */ Loading @@ -190,6 +189,6 @@ public interface KeyguardViewController { ViewGroup container, ViewGroup container, NotificationPanelViewController notificationPanelViewController, NotificationPanelViewController notificationPanelViewController, BiometricUnlockController biometricUnlockController, BiometricUnlockController biometricUnlockController, ViewGroup lockIconContainer, View notificationContainer, View notificationContainer, KeyguardBypassController bypassController); KeyguardBypassController bypassController); } } Loading
packages/SystemUI/res/layout/status_bar_expanded.xml +5 −0 Original line number Original line Diff line number Diff line Loading @@ -112,4 +112,9 @@ android:layout_width="match_parent" /> android:layout_width="match_parent" /> <include layout="@layout/status_bar_expanded_plugin_frame"/> <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> </com.android.systemui.statusbar.phone.NotificationPanelView>
packages/SystemUI/res/layout/super_notification_shade.xml +3 −13 Original line number Original line Diff line number Diff line Loading @@ -80,23 +80,13 @@ sysui:ignoreRightInset="true" sysui:ignoreRightInset="true" /> /> <LinearLayout <!-- Keyguard messages --> android:id="@+id/lock_icon_container" <FrameLayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/status_bar_height" android:layout_marginTop="@dimen/status_bar_height" android:layout_gravity="top|center_horizontal" android:layout_gravity="top|center_horizontal" android:gravity="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 <com.android.keyguard.KeyguardMessageArea android:id="@+id/keyguard_message_area" android:id="@+id/keyguard_message_area" style="@style/Keyguard.TextView" style="@style/Keyguard.TextView" Loading @@ -107,7 +97,7 @@ android:singleLine="true" android:singleLine="true" android:ellipsize="marquee" android:ellipsize="marquee" android:focusable="true" /> android:focusable="true" /> </LinearLayout> </FrameLayout> <com.android.systemui.biometrics.AuthRippleView <com.android.systemui.biometrics.AuthRippleView android:id="@+id/auth_ripple" android:id="@+id/auth_ripple" Loading
packages/SystemUI/res/values/config.xml +7 −0 Original line number Original line Diff line number Diff line Loading @@ -649,4 +649,11 @@ <!-- sensorLocationY --> <!-- sensorLocationY --> <!--sensorRadius --> <!--sensorRadius --> </integer-array> </integer-array> <!-- The properties of the lock icon in pixels. --> <integer-array name="config_lock_icon_props"> <!-- X --> <!-- Y --> <!-- radius --> </integer-array> </resources> </resources>
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +15 −13 Original line number Original line Diff line number Diff line Loading @@ -315,6 +315,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab private boolean mLogoutEnabled; private boolean mLogoutEnabled; // cached value to avoid IPCs // cached value to avoid IPCs private boolean mIsUdfpsEnrolled; private boolean mIsUdfpsEnrolled; private boolean mIsFaceEnrolled; // If the user long pressed the lock icon, disabling face auth for the current session. // If the user long pressed the lock icon, disabling face auth for the current session. private boolean mLockIconPressed; private boolean mLockIconPressed; private int mActiveMobileDataSubscription = SubscriptionManager.INVALID_SUBSCRIPTION_ID; private int mActiveMobileDataSubscription = SubscriptionManager.INVALID_SUBSCRIPTION_ID; Loading Loading @@ -1944,15 +1945,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mIsUdfpsEnrolled = mAuthController.isUdfpsEnrolled(userId); mIsUdfpsEnrolled = mAuthController.isUdfpsEnrolled(userId); } } /** private void updateFaceEnrolled(int userId) { * Whether to show the lock icon on lock screen and bouncer. mIsFaceEnrolled = whitelistIpcs( */ () -> mFaceManager != null && mFaceManager.isHardwareDetected() public boolean canShowLockIcon() { && mFaceManager.hasEnrolledTemplates(userId) if (mLockScreenMode == LOCK_SCREEN_MODE_LAYOUT_1) { && mFaceSettingEnabledForUser.get(userId)); return isFaceAuthEnabledForUser(KeyguardUpdateMonitor.getCurrentUser()) && !isUdfpsEnrolled(); } return true; } } /** /** Loading @@ -1962,6 +1959,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab return mIsUdfpsEnrolled; return mIsUdfpsEnrolled; } } /** * @return true if there's at least one face enrolled */ public boolean isFaceEnrolled() { return mIsFaceEnrolled; } private final UserSwitchObserver mUserSwitchObserver = new UserSwitchObserver() { private final UserSwitchObserver mUserSwitchObserver = new UserSwitchObserver() { @Override @Override public void onUserSwitching(int newUserId, IRemoteCallback reply) { public void onUserSwitching(int newUserId, IRemoteCallback reply) { Loading Loading @@ -2279,10 +2283,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab * If face hardware is available, user has enrolled and enabled auth via setting. * If face hardware is available, user has enrolled and enabled auth via setting. */ */ public boolean isFaceAuthEnabledForUser(int userId) { public boolean isFaceAuthEnabledForUser(int userId) { // TODO(b/140034352) updateFaceEnrolled(userId); return whitelistIpcs(() -> mFaceManager != null && mFaceManager.isHardwareDetected() return mIsFaceEnrolled; && mFaceManager.hasEnrolledTemplates(userId) && mFaceSettingEnabledForUser.get(userId)); } } private void stopListeningForFingerprint() { private void stopListeningForFingerprint() { Loading
packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java +1 −2 Original line number Original line Diff line number Diff line Loading @@ -182,7 +182,6 @@ public interface KeyguardViewController { * @param container * @param container * @param notificationPanelViewController * @param notificationPanelViewController * @param biometricUnlockController * @param biometricUnlockController * @param lockIconContainer * @param notificationContainer * @param notificationContainer * @param bypassController * @param bypassController */ */ Loading @@ -190,6 +189,6 @@ public interface KeyguardViewController { ViewGroup container, ViewGroup container, NotificationPanelViewController notificationPanelViewController, NotificationPanelViewController notificationPanelViewController, BiometricUnlockController biometricUnlockController, BiometricUnlockController biometricUnlockController, ViewGroup lockIconContainer, View notificationContainer, View notificationContainer, KeyguardBypassController bypassController); KeyguardBypassController bypassController); } }