Loading packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +10 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import android.hardware.face.FaceManager; import android.hardware.face.FaceSensorPropertiesInternal; import android.hardware.face.IFaceAuthenticatorsRegisteredCallback; import android.hardware.fingerprint.FingerprintManager; import android.hardware.fingerprint.FingerprintSensorProperties; import android.hardware.fingerprint.FingerprintSensorPropertiesInternal; import android.hardware.fingerprint.IFingerprintAuthenticatorsRegisteredCallback; import android.hardware.fingerprint.IUdfpsRefreshRateRequestCallback; Loading Loading @@ -1158,6 +1159,15 @@ public class AuthController implements return mFaceEnrolledForUser.get(userId); } /** * Does the provided user have at least one optical udfps fingerprint enrolled? */ public boolean isOpticalUdfpsEnrolled(int userId) { return isUdfpsEnrolled(userId) && mUdfpsProps != null && mUdfpsProps.get(0).sensorType == FingerprintSensorProperties.TYPE_UDFPS_OPTICAL; } /** * Whether the passed userId has enrolled UDFPS. */ Loading packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java +5 −1 Original line number Diff line number Diff line Loading @@ -373,7 +373,9 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW boolean onKeyguard = state.statusBarState == StatusBarState.KEYGUARD && !state.keyguardFadingAway && !state.keyguardGoingAway; if (onKeyguard && mAuthController.isUdfpsEnrolled(mUserInteractor.get().getSelectedUserId())) { && mAuthController.isOpticalUdfpsEnrolled( mUserInteractor.get().getSelectedUserId()) ) { // Requests the max refresh rate (ie: for smooth display). Note: By setting // the preferred refresh rates below, the refresh rate will not override the max // refresh rate in settings (ie: if smooth display is OFF). Loading Loading @@ -892,6 +894,8 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW pw.println(TAG + ":"); pw.println(" mKeyguardMaxRefreshRate=" + mKeyguardMaxRefreshRate); pw.println(" mKeyguardPreferredRefreshRate=" + mKeyguardPreferredRefreshRate); pw.println(" preferredMinDisplayRefreshRate=" + mLpChanged.preferredMinDisplayRefreshRate); pw.println(" preferredMaxDisplayRefreshRate=" + mLpChanged.preferredMaxDisplayRefreshRate); pw.println(" mDeferWindowLayoutParams=" + mDeferWindowLayoutParams); pw.println(mCurrentState); if (mWindowRootView != null && mWindowRootView.getViewRootImpl() != null) { Loading packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowControllerImplTest.java +6 −6 Original line number Diff line number Diff line Loading @@ -525,8 +525,8 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase { @Test public void udfpsEnrolled_minAndMaxRefreshRateSetToPreferredRefreshRate() { // GIVEN udfps is enrolled when(mAuthController.isUdfpsEnrolled(anyInt())).thenReturn(true); // GIVEN optical udfps is enrolled when(mAuthController.isOpticalUdfpsEnrolled(anyInt())).thenReturn(true); // WHEN keyguard is showing setKeyguardShowing(); Loading @@ -540,9 +540,9 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase { } @Test public void udfpsNotEnrolled_refreshRateUnset() { public void opticalUdfpsNotEnrolled_refreshRateUnset() { // GIVEN udfps is NOT enrolled when(mAuthController.isUdfpsEnrolled(anyInt())).thenReturn(false); when(mAuthController.isOpticalUdfpsEnrolled(anyInt())).thenReturn(false); // WHEN keyguard is showing setKeyguardShowing(); Loading @@ -557,8 +557,8 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase { @Test public void keyguardNotShowing_refreshRateUnset() { // GIVEN UDFPS is enrolled when(mAuthController.isUdfpsEnrolled(anyInt())).thenReturn(true); // GIVEN optical UDFPS is enrolled when(mAuthController.isOpticalUdfpsEnrolled(anyInt())).thenReturn(true); // WHEN keyguard is NOT showing mNotificationShadeWindowController.setKeyguardShowing(false); Loading Loading
packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +10 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import android.hardware.face.FaceManager; import android.hardware.face.FaceSensorPropertiesInternal; import android.hardware.face.IFaceAuthenticatorsRegisteredCallback; import android.hardware.fingerprint.FingerprintManager; import android.hardware.fingerprint.FingerprintSensorProperties; import android.hardware.fingerprint.FingerprintSensorPropertiesInternal; import android.hardware.fingerprint.IFingerprintAuthenticatorsRegisteredCallback; import android.hardware.fingerprint.IUdfpsRefreshRateRequestCallback; Loading Loading @@ -1158,6 +1159,15 @@ public class AuthController implements return mFaceEnrolledForUser.get(userId); } /** * Does the provided user have at least one optical udfps fingerprint enrolled? */ public boolean isOpticalUdfpsEnrolled(int userId) { return isUdfpsEnrolled(userId) && mUdfpsProps != null && mUdfpsProps.get(0).sensorType == FingerprintSensorProperties.TYPE_UDFPS_OPTICAL; } /** * Whether the passed userId has enrolled UDFPS. */ Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java +5 −1 Original line number Diff line number Diff line Loading @@ -373,7 +373,9 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW boolean onKeyguard = state.statusBarState == StatusBarState.KEYGUARD && !state.keyguardFadingAway && !state.keyguardGoingAway; if (onKeyguard && mAuthController.isUdfpsEnrolled(mUserInteractor.get().getSelectedUserId())) { && mAuthController.isOpticalUdfpsEnrolled( mUserInteractor.get().getSelectedUserId()) ) { // Requests the max refresh rate (ie: for smooth display). Note: By setting // the preferred refresh rates below, the refresh rate will not override the max // refresh rate in settings (ie: if smooth display is OFF). Loading Loading @@ -892,6 +894,8 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW pw.println(TAG + ":"); pw.println(" mKeyguardMaxRefreshRate=" + mKeyguardMaxRefreshRate); pw.println(" mKeyguardPreferredRefreshRate=" + mKeyguardPreferredRefreshRate); pw.println(" preferredMinDisplayRefreshRate=" + mLpChanged.preferredMinDisplayRefreshRate); pw.println(" preferredMaxDisplayRefreshRate=" + mLpChanged.preferredMaxDisplayRefreshRate); pw.println(" mDeferWindowLayoutParams=" + mDeferWindowLayoutParams); pw.println(mCurrentState); if (mWindowRootView != null && mWindowRootView.getViewRootImpl() != null) { Loading
packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowControllerImplTest.java +6 −6 Original line number Diff line number Diff line Loading @@ -525,8 +525,8 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase { @Test public void udfpsEnrolled_minAndMaxRefreshRateSetToPreferredRefreshRate() { // GIVEN udfps is enrolled when(mAuthController.isUdfpsEnrolled(anyInt())).thenReturn(true); // GIVEN optical udfps is enrolled when(mAuthController.isOpticalUdfpsEnrolled(anyInt())).thenReturn(true); // WHEN keyguard is showing setKeyguardShowing(); Loading @@ -540,9 +540,9 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase { } @Test public void udfpsNotEnrolled_refreshRateUnset() { public void opticalUdfpsNotEnrolled_refreshRateUnset() { // GIVEN udfps is NOT enrolled when(mAuthController.isUdfpsEnrolled(anyInt())).thenReturn(false); when(mAuthController.isOpticalUdfpsEnrolled(anyInt())).thenReturn(false); // WHEN keyguard is showing setKeyguardShowing(); Loading @@ -557,8 +557,8 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase { @Test public void keyguardNotShowing_refreshRateUnset() { // GIVEN UDFPS is enrolled when(mAuthController.isUdfpsEnrolled(anyInt())).thenReturn(true); // GIVEN optical UDFPS is enrolled when(mAuthController.isOpticalUdfpsEnrolled(anyInt())).thenReturn(true); // WHEN keyguard is NOT showing mNotificationShadeWindowController.setKeyguardShowing(false); Loading