Loading packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java +25 −2 Original line number Diff line number Diff line Loading @@ -21,12 +21,14 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.graphics.Color; import android.hardware.biometrics.BiometricSourceType; import android.icu.text.NumberFormat; import com.android.settingslib.Utils; import com.android.systemui.R; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.util.ViewController; Loading @@ -35,13 +37,15 @@ import java.util.Objects; import java.util.TimeZone; /** * Controller for an AnimatableClockView. * Controller for an AnimatableClockView. Instantiated by {@link KeyguardClockSwitchController}. */ public class AnimatableClockController extends ViewController<AnimatableClockView> { private static final int FORMAT_NUMBER = 1234567890; private final StatusBarStateController mStatusBarStateController; private final BroadcastDispatcher mBroadcastDispatcher; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final KeyguardBypassController mBypassController; private final int mDozingColor = Color.WHITE; private int mLockScreenColor; Loading @@ -59,12 +63,16 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie AnimatableClockView view, StatusBarStateController statusBarStateController, BroadcastDispatcher broadcastDispatcher, BatteryController batteryController) { BatteryController batteryController, KeyguardUpdateMonitor keyguardUpdateMonitor, KeyguardBypassController bypassController) { super(view); mStatusBarStateController = statusBarStateController; mIsDozing = mStatusBarStateController.isDozing(); mDozeAmount = mStatusBarStateController.getDozeAmount(); mBroadcastDispatcher = broadcastDispatcher; mKeyguardUpdateMonitor = keyguardUpdateMonitor; mBypassController = bypassController; mBurmeseNumerals = mBurmeseNf.format(FORMAT_NUMBER); mBurmeseLineSpacing = getContext().getResources().getFloat( Loading Loading @@ -98,14 +106,29 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie mStatusBarStateController.addCallback(mStatusBarStateListener); mIsDozing = mStatusBarStateController.isDozing(); mDozeAmount = mStatusBarStateController.getDozeAmount(); mKeyguardUpdateMonitor.registerCallback(mKeyguardUpdateMonitorCallback); refreshTime(); initColors(); } private final KeyguardUpdateMonitorCallback mKeyguardUpdateMonitorCallback = new KeyguardUpdateMonitorCallback() { @Override public void onBiometricAuthenticated(int userId, BiometricSourceType biometricSourceType, boolean isStrongBiometric) { if (biometricSourceType == BiometricSourceType.FACE && mBypassController.canBypass()) { mView.animateDisappear(); } } }; @Override protected void onViewDetached() { mBroadcastDispatcher.unregisterReceiver(mLocaleBroadcastReceiver); mStatusBarStateController.removeCallback(mStatusBarStateListener); mKeyguardUpdateMonitor.removeCallback(mKeyguardUpdateMonitorCallback); } /** Loading packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java +16 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.util.AttributeSet; import android.widget.TextView; import com.android.systemui.R; import com.android.systemui.statusbar.phone.KeyguardBypassController; import java.util.Calendar; import java.util.TimeZone; Loading Loading @@ -155,6 +156,21 @@ public class AnimatableClockView extends TextView { mLockScreenColor = lockScreenColor; } void animateDisappear() { if (mTextAnimator == null) { return; } setTextStyle( 0 /* weight */, -1 /* text size, no update */, null /* color, no update */, true /* animate */, KeyguardBypassController.BYPASS_FADE_DURATION /* duration */, 0 /* delay */, null /* onAnimationEnd */); } void animateCharge(boolean isDozing) { if (mTextAnimator == null || mTextAnimator.isRunning()) { // Skip charge animation if dozing animation is already playing. Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +22 −12 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.statusbar.notification.AnimatableProperty; import com.android.systemui.statusbar.notification.PropertyAnimator; import com.android.systemui.statusbar.notification.stack.AnimationProperties; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.NotificationIconAreaController; import com.android.systemui.statusbar.phone.NotificationIconContainer; import com.android.systemui.statusbar.policy.BatteryController; Loading Loading @@ -90,10 +91,11 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS private SmartspaceSession mSmartspaceSession; private SmartspaceSession.OnTargetsAvailableListener mSmartspaceCallback; private int mWallpaperTextColor; private ConfigurationController mConfigurationController; private ActivityStarter mActivityStarter; private FalsingManager mFalsingManager; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final KeyguardBypassController mBypassController; /** * Listener for changes to the color palette. Loading Loading @@ -147,7 +149,9 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS ConfigurationController configurationController, SystemUIFactory systemUIFactory, ActivityStarter activityStarter, FalsingManager falsingManager) { FalsingManager falsingManager, KeyguardUpdateMonitor keyguardUpdateMonitor, KeyguardBypassController bypassController) { super(keyguardClockSwitch); mStatusBarStateController = statusBarStateController; mColorExtractor = colorExtractor; Loading @@ -162,6 +166,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mSystemUIFactory = systemUIFactory; mActivityStarter = activityStarter; mFalsingManager = falsingManager; mKeyguardUpdateMonitor = keyguardUpdateMonitor; mBypassController = bypassController; } /** Loading Loading @@ -189,7 +195,9 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mView.findViewById(R.id.animatable_clock_view), mStatusBarStateController, mBroadcastDispatcher, mBatteryController); mBatteryController, mKeyguardUpdateMonitor, mBypassController); mClockViewController.init(); mLargeClockViewController = Loading @@ -197,7 +205,9 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mView.findViewById(R.id.animatable_clock_view_large), mStatusBarStateController, mBroadcastDispatcher, mBatteryController); mBatteryController, mKeyguardUpdateMonitor, mBypassController); mLargeClockViewController.init(); mStatusBarStateController.addCallback(mStatusBarStateListener); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt +1 −1 Original line number Diff line number Diff line Loading @@ -217,7 +217,7 @@ open class KeyguardBypassController : Dumpable { } companion object { const val BYPASS_PANEL_FADE_DURATION = 67 const val BYPASS_FADE_DURATION = 67 private const val FACE_UNLOCK_BYPASS_NO_OVERRIDE = 0 private const val FACE_UNLOCK_BYPASS_ALWAYS = 1 Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +1 −2 Original line number Diff line number Diff line Loading @@ -615,7 +615,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb boolean needsFading = needsBypassFading(); if (needsFading) { delay = 0; fadeoutDuration = KeyguardBypassController.BYPASS_PANEL_FADE_DURATION; fadeoutDuration = KeyguardBypassController.BYPASS_FADE_DURATION; } else if (wakeUnlockPulsing) { delay = 0; fadeoutDuration = 240; Loading Loading @@ -979,7 +979,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb resetAlternateAuth(false); executeAfterKeyguardGoneAction(); } } public void showBouncerMessage(String message, ColorStateList colorState) { Loading Loading
packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java +25 −2 Original line number Diff line number Diff line Loading @@ -21,12 +21,14 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.graphics.Color; import android.hardware.biometrics.BiometricSourceType; import android.icu.text.NumberFormat; import com.android.settingslib.Utils; import com.android.systemui.R; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.util.ViewController; Loading @@ -35,13 +37,15 @@ import java.util.Objects; import java.util.TimeZone; /** * Controller for an AnimatableClockView. * Controller for an AnimatableClockView. Instantiated by {@link KeyguardClockSwitchController}. */ public class AnimatableClockController extends ViewController<AnimatableClockView> { private static final int FORMAT_NUMBER = 1234567890; private final StatusBarStateController mStatusBarStateController; private final BroadcastDispatcher mBroadcastDispatcher; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final KeyguardBypassController mBypassController; private final int mDozingColor = Color.WHITE; private int mLockScreenColor; Loading @@ -59,12 +63,16 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie AnimatableClockView view, StatusBarStateController statusBarStateController, BroadcastDispatcher broadcastDispatcher, BatteryController batteryController) { BatteryController batteryController, KeyguardUpdateMonitor keyguardUpdateMonitor, KeyguardBypassController bypassController) { super(view); mStatusBarStateController = statusBarStateController; mIsDozing = mStatusBarStateController.isDozing(); mDozeAmount = mStatusBarStateController.getDozeAmount(); mBroadcastDispatcher = broadcastDispatcher; mKeyguardUpdateMonitor = keyguardUpdateMonitor; mBypassController = bypassController; mBurmeseNumerals = mBurmeseNf.format(FORMAT_NUMBER); mBurmeseLineSpacing = getContext().getResources().getFloat( Loading Loading @@ -98,14 +106,29 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie mStatusBarStateController.addCallback(mStatusBarStateListener); mIsDozing = mStatusBarStateController.isDozing(); mDozeAmount = mStatusBarStateController.getDozeAmount(); mKeyguardUpdateMonitor.registerCallback(mKeyguardUpdateMonitorCallback); refreshTime(); initColors(); } private final KeyguardUpdateMonitorCallback mKeyguardUpdateMonitorCallback = new KeyguardUpdateMonitorCallback() { @Override public void onBiometricAuthenticated(int userId, BiometricSourceType biometricSourceType, boolean isStrongBiometric) { if (biometricSourceType == BiometricSourceType.FACE && mBypassController.canBypass()) { mView.animateDisappear(); } } }; @Override protected void onViewDetached() { mBroadcastDispatcher.unregisterReceiver(mLocaleBroadcastReceiver); mStatusBarStateController.removeCallback(mStatusBarStateListener); mKeyguardUpdateMonitor.removeCallback(mKeyguardUpdateMonitorCallback); } /** Loading
packages/SystemUI/src/com/android/keyguard/AnimatableClockView.java +16 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.util.AttributeSet; import android.widget.TextView; import com.android.systemui.R; import com.android.systemui.statusbar.phone.KeyguardBypassController; import java.util.Calendar; import java.util.TimeZone; Loading Loading @@ -155,6 +156,21 @@ public class AnimatableClockView extends TextView { mLockScreenColor = lockScreenColor; } void animateDisappear() { if (mTextAnimator == null) { return; } setTextStyle( 0 /* weight */, -1 /* text size, no update */, null /* color, no update */, true /* animate */, KeyguardBypassController.BYPASS_FADE_DURATION /* duration */, 0 /* delay */, null /* onAnimationEnd */); } void animateCharge(boolean isDozing) { if (mTextAnimator == null || mTextAnimator.isRunning()) { // Skip charge animation if dozing animation is already playing. Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +22 −12 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.statusbar.notification.AnimatableProperty; import com.android.systemui.statusbar.notification.PropertyAnimator; import com.android.systemui.statusbar.notification.stack.AnimationProperties; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.NotificationIconAreaController; import com.android.systemui.statusbar.phone.NotificationIconContainer; import com.android.systemui.statusbar.policy.BatteryController; Loading Loading @@ -90,10 +91,11 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS private SmartspaceSession mSmartspaceSession; private SmartspaceSession.OnTargetsAvailableListener mSmartspaceCallback; private int mWallpaperTextColor; private ConfigurationController mConfigurationController; private ActivityStarter mActivityStarter; private FalsingManager mFalsingManager; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final KeyguardBypassController mBypassController; /** * Listener for changes to the color palette. Loading Loading @@ -147,7 +149,9 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS ConfigurationController configurationController, SystemUIFactory systemUIFactory, ActivityStarter activityStarter, FalsingManager falsingManager) { FalsingManager falsingManager, KeyguardUpdateMonitor keyguardUpdateMonitor, KeyguardBypassController bypassController) { super(keyguardClockSwitch); mStatusBarStateController = statusBarStateController; mColorExtractor = colorExtractor; Loading @@ -162,6 +166,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mSystemUIFactory = systemUIFactory; mActivityStarter = activityStarter; mFalsingManager = falsingManager; mKeyguardUpdateMonitor = keyguardUpdateMonitor; mBypassController = bypassController; } /** Loading Loading @@ -189,7 +195,9 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mView.findViewById(R.id.animatable_clock_view), mStatusBarStateController, mBroadcastDispatcher, mBatteryController); mBatteryController, mKeyguardUpdateMonitor, mBypassController); mClockViewController.init(); mLargeClockViewController = Loading @@ -197,7 +205,9 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mView.findViewById(R.id.animatable_clock_view_large), mStatusBarStateController, mBroadcastDispatcher, mBatteryController); mBatteryController, mKeyguardUpdateMonitor, mBypassController); mLargeClockViewController.init(); mStatusBarStateController.addCallback(mStatusBarStateListener); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt +1 −1 Original line number Diff line number Diff line Loading @@ -217,7 +217,7 @@ open class KeyguardBypassController : Dumpable { } companion object { const val BYPASS_PANEL_FADE_DURATION = 67 const val BYPASS_FADE_DURATION = 67 private const val FACE_UNLOCK_BYPASS_NO_OVERRIDE = 0 private const val FACE_UNLOCK_BYPASS_ALWAYS = 1 Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +1 −2 Original line number Diff line number Diff line Loading @@ -615,7 +615,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb boolean needsFading = needsBypassFading(); if (needsFading) { delay = 0; fadeoutDuration = KeyguardBypassController.BYPASS_PANEL_FADE_DURATION; fadeoutDuration = KeyguardBypassController.BYPASS_FADE_DURATION; } else if (wakeUnlockPulsing) { delay = 0; fadeoutDuration = 240; Loading Loading @@ -979,7 +979,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb resetAlternateAuth(false); executeAfterKeyguardGoneAction(); } } public void showBouncerMessage(String message, ColorStateList colorState) { Loading