Loading packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +19 −1 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.doze.DozeReceiver; import com.android.systemui.keyguard.WakefulnessLifecycle; import com.android.systemui.keyguard.data.repository.BiometricType; import com.android.systemui.log.core.LogLevel; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.VibratorHelper; import com.android.systemui.util.concurrency.DelayableExecutor; Loading Loading @@ -156,7 +157,7 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks, @Nullable private UdfpsOverlayParams mUdfpsOverlayParams; @Nullable private IUdfpsRefreshRateRequestCallback mUdfpsRefreshRateRequestCallback; @Nullable private SideFpsController mSideFpsController; @Nullable private UdfpsLogger mUdfpsLogger; @NonNull private UdfpsLogger mUdfpsLogger; @VisibleForTesting IBiometricSysuiReceiver mReceiver; @VisibleForTesting @NonNull final BiometricDisplayListener mOrientationListener; @Nullable private final List<FaceSensorPropertiesInternal> mFaceProps; Loading Loading @@ -926,6 +927,23 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks, return mUdfpsRefreshRateRequestCallback; } /** * Requests (or stops requesting) the max refresh rate. This can override user settings * for the max refresh rate. */ public void requestMaxRefreshRate(boolean request) throws RemoteException { if (mUdfpsRefreshRateRequestCallback == null) { mUdfpsLogger.log( "PreAuthRefreshRate", "skip request - refreshRateCallback is null", LogLevel.DEBUG ); return; } mUdfpsLogger.requestMaxRefreshRate(request); mUdfpsRefreshRateRequestCallback.onAuthenticationPossible(mContext.getDisplayId(), request); } @Override public void showAuthenticationDialog(PromptInfo promptInfo, IBiometricSysuiReceiver receiver, int[] sensorIds, boolean credentialAllowed, boolean requireConfirmation, Loading packages/SystemUI/src/com/android/systemui/biometrics/UdfpsLogger.kt +4 −0 Original line number Diff line number Diff line Loading @@ -42,4 +42,8 @@ class UdfpsLogger @Inject constructor(@UdfpsLog private val logBuffer: LogBuffer fun log(tag: String, @CompileTimeConstant msg: String, level: LogLevel) { logBuffer.log(tag, level, msg) } fun requestMaxRefreshRate(request: Boolean) { logBuffer.log("RefreshRate", LogLevel.DEBUG, { bool1 = request }, { "Request max: $bool1" }) } } packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java +4 −1 Original line number Diff line number Diff line Loading @@ -355,7 +355,10 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW && !state.keyguardFadingAway && !state.keyguardGoingAway; if (onKeyguard && mAuthController.isUdfpsEnrolled(mUserInteractor.get().getSelectedUserId())) { // both max and min display refresh rate must be set to take effect: // 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). // Both max and min display refresh rate must be set to take effect: mLpChanged.preferredMaxDisplayRefreshRate = mKeyguardPreferredRefreshRate; mLpChanged.preferredMinDisplayRefreshRate = mKeyguardPreferredRefreshRate; } else { Loading Loading
packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +19 −1 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.doze.DozeReceiver; import com.android.systemui.keyguard.WakefulnessLifecycle; import com.android.systemui.keyguard.data.repository.BiometricType; import com.android.systemui.log.core.LogLevel; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.VibratorHelper; import com.android.systemui.util.concurrency.DelayableExecutor; Loading Loading @@ -156,7 +157,7 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks, @Nullable private UdfpsOverlayParams mUdfpsOverlayParams; @Nullable private IUdfpsRefreshRateRequestCallback mUdfpsRefreshRateRequestCallback; @Nullable private SideFpsController mSideFpsController; @Nullable private UdfpsLogger mUdfpsLogger; @NonNull private UdfpsLogger mUdfpsLogger; @VisibleForTesting IBiometricSysuiReceiver mReceiver; @VisibleForTesting @NonNull final BiometricDisplayListener mOrientationListener; @Nullable private final List<FaceSensorPropertiesInternal> mFaceProps; Loading Loading @@ -926,6 +927,23 @@ public class AuthController implements CoreStartable, CommandQueue.Callbacks, return mUdfpsRefreshRateRequestCallback; } /** * Requests (or stops requesting) the max refresh rate. This can override user settings * for the max refresh rate. */ public void requestMaxRefreshRate(boolean request) throws RemoteException { if (mUdfpsRefreshRateRequestCallback == null) { mUdfpsLogger.log( "PreAuthRefreshRate", "skip request - refreshRateCallback is null", LogLevel.DEBUG ); return; } mUdfpsLogger.requestMaxRefreshRate(request); mUdfpsRefreshRateRequestCallback.onAuthenticationPossible(mContext.getDisplayId(), request); } @Override public void showAuthenticationDialog(PromptInfo promptInfo, IBiometricSysuiReceiver receiver, int[] sensorIds, boolean credentialAllowed, boolean requireConfirmation, Loading
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsLogger.kt +4 −0 Original line number Diff line number Diff line Loading @@ -42,4 +42,8 @@ class UdfpsLogger @Inject constructor(@UdfpsLog private val logBuffer: LogBuffer fun log(tag: String, @CompileTimeConstant msg: String, level: LogLevel) { logBuffer.log(tag, level, msg) } fun requestMaxRefreshRate(request: Boolean) { logBuffer.log("RefreshRate", LogLevel.DEBUG, { bool1 = request }, { "Request max: $bool1" }) } }
packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java +4 −1 Original line number Diff line number Diff line Loading @@ -355,7 +355,10 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW && !state.keyguardFadingAway && !state.keyguardGoingAway; if (onKeyguard && mAuthController.isUdfpsEnrolled(mUserInteractor.get().getSelectedUserId())) { // both max and min display refresh rate must be set to take effect: // 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). // Both max and min display refresh rate must be set to take effect: mLpChanged.preferredMaxDisplayRefreshRate = mKeyguardPreferredRefreshRate; mLpChanged.preferredMinDisplayRefreshRate = mKeyguardPreferredRefreshRate; } else { Loading