Loading packages/SystemUI/src/com/android/keyguard/ClockEventController.kt +2 −3 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ import com.android.systemui.customization.R import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.dagger.qualifiers.DisplaySpecific import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.FeatureFlagsClassic import com.android.systemui.flags.Flags.REGION_SAMPLING import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor Loading @@ -47,7 +47,6 @@ import com.android.systemui.keyguard.shared.KeyguardShadeMigrationNssl import com.android.systemui.keyguard.shared.model.TransitionState import com.android.systemui.lifecycle.repeatWhenAttached import com.android.systemui.log.core.Logger import com.android.systemui.log.core.LogLevel.DEBUG import com.android.systemui.plugins.clocks.ClockController import com.android.systemui.plugins.clocks.ClockFaceController import com.android.systemui.plugins.clocks.ClockMessageBuffers Loading Loading @@ -92,7 +91,7 @@ constructor( @Main private val mainExecutor: DelayableExecutor, @Background private val bgExecutor: Executor, private val clockBuffers: ClockMessageBuffers, private val featureFlags: FeatureFlags, private val featureFlags: FeatureFlagsClassic, private val zenModeController: ZenModeController, ) { var loggers = listOf( Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +6 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,9 @@ public class KeyguardClockSwitch extends RelativeLayout { mSmallClockFrame = findViewById(R.id.lockscreen_clock_view); mLargeClockFrame = findViewById(R.id.lockscreen_clock_view_large); mStatusArea = findViewById(R.id.keyguard_status_area); } else { removeView(findViewById(R.id.lockscreen_clock_view)); removeView(findViewById(R.id.lockscreen_clock_view_large)); } onConfigChanged(); } Loading Loading @@ -263,6 +266,9 @@ public class KeyguardClockSwitch extends RelativeLayout { } void updateClockTargetRegions() { if (migrateClocksToBlueprint()) { return; } if (mClock != null) { if (mSmallClockFrame.isLaidOut()) { Rect targetRegion = getSmallClockRegion(mSmallClockFrame); Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +20 −8 Original line number Diff line number Diff line Loading @@ -246,8 +246,11 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS protected void onInit() { mKeyguardSliceViewController.init(); if (!migrateClocksToBlueprint()) { mSmallClockFrame = mView.findViewById(R.id.lockscreen_clock_view); mLargeClockFrame = mView.findViewById(R.id.lockscreen_clock_view_large); } if (!mOnlyClock) { mDumpManager.unregisterDumpable(getClass().getSimpleName()); // unregister previous Loading Loading @@ -526,7 +529,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS */ void updatePosition(int x, float scale, AnimationProperties props, boolean animate) { x = getCurrentLayoutDirection() == View.LAYOUT_DIRECTION_RTL ? -x : x; if (!migrateClocksToBlueprint()) { PropertyAnimator.setProperty(mSmallClockFrame, AnimatableProperty.TRANSLATION_X, x, props, animate); PropertyAnimator.setProperty(mLargeClockFrame, AnimatableProperty.SCALE_X, Loading @@ -534,6 +537,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS PropertyAnimator.setProperty(mLargeClockFrame, AnimatableProperty.SCALE_Y, scale, props, animate); } if (mStatusArea != null) { PropertyAnimator.setProperty(mStatusArea, KeyguardStatusAreaView.TRANSLATE_X_AOD, x, props, animate); Loading @@ -550,6 +555,10 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS return 0; } if (migrateClocksToBlueprint()) { return 0; } if (mLargeClockFrame.getVisibility() == View.VISIBLE) { // This gets the expected clock bottom if mLargeClockFrame had a top margin, but it's // top margin only contributed to height and didn't move the top of the view (as this Loading Loading @@ -581,6 +590,9 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS } boolean isClockTopAligned() { if (migrateClocksToBlueprint()) { return mKeyguardClockInteractor.getClockSize().getValue() == LARGE; } return mLargeClockFrame.getVisibility() != View.VISIBLE; } Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt +7 −1 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import com.android.systemui.keyguard.ui.view.KeyguardRootView import com.android.systemui.keyguard.ui.view.layout.KeyguardBlueprintCommandListener import com.android.systemui.keyguard.ui.viewmodel.AodAlphaViewModel import com.android.systemui.keyguard.ui.viewmodel.KeyguardBlueprintViewModel import com.android.systemui.keyguard.ui.viewmodel.KeyguardClockViewModel import com.android.systemui.keyguard.ui.viewmodel.KeyguardIndicationAreaViewModel import com.android.systemui.keyguard.ui.viewmodel.KeyguardRootViewModel import com.android.systemui.keyguard.ui.viewmodel.OccludingAppDeviceEntryMessageViewModel Loading Loading @@ -86,6 +87,7 @@ constructor( private val vibratorHelper: VibratorHelper, private val falsingManager: FalsingManager, private val aodAlphaViewModel: AodAlphaViewModel, private val keyguardClockViewModel: KeyguardClockViewModel, ) : CoreStartable { private var rootViewHandle: DisposableHandle? = null Loading Loading @@ -113,7 +115,11 @@ constructor( initializeViews() if (!SceneContainerFlag.isEnabled) { KeyguardBlueprintViewBinder.bind(keyguardRootView, keyguardBlueprintViewModel) KeyguardBlueprintViewBinder.bind( keyguardRootView, keyguardBlueprintViewModel, keyguardClockViewModel ) } keyguardBlueprintCommandListener.start() } Loading packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardBlueprintRepository.kt +9 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.shared.model.KeyguardBlueprint import com.android.systemui.keyguard.ui.view.layout.blueprints.DefaultKeyguardBlueprint.Companion.DEFAULT import com.android.systemui.keyguard.ui.view.layout.blueprints.KeyguardBlueprintModule import com.android.systemui.keyguard.ui.view.layout.blueprints.transitions.IntraBlueprintTransitionType import com.android.systemui.keyguard.ui.view.layout.blueprints.transitions.IntraBlueprintTransitionType.DefaultTransition import java.io.PrintWriter import java.util.TreeMap import javax.inject.Inject Loading Loading @@ -54,6 +56,8 @@ constructor( TreeMap<String, KeyguardBlueprint>().apply { putAll(blueprints.associateBy { it.id }) } val blueprint: MutableStateFlow<KeyguardBlueprint> = MutableStateFlow(blueprintIdMap[DEFAULT]!!) val refreshBluePrint: MutableSharedFlow<Unit> = MutableSharedFlow(extraBufferCapacity = 1) val refreshBlueprintTransition: MutableSharedFlow<IntraBlueprintTransitionType> = MutableSharedFlow(extraBufferCapacity = 1) val configurationChange: Flow<Unit> = configurationRepository.onAnyConfigurationChange /** Loading Loading @@ -103,7 +107,12 @@ constructor( /** Re-emits the last emitted blueprint value if possible. */ fun refreshBlueprint() { refreshBlueprintWithTransition(DefaultTransition) } fun refreshBlueprintWithTransition(type: IntraBlueprintTransitionType = DefaultTransition) { refreshBluePrint.tryEmit(Unit) refreshBlueprintTransition.tryEmit(type) } /** Prints all available blueprints to the PrintWriter. */ Loading Loading
packages/SystemUI/src/com/android/keyguard/ClockEventController.kt +2 −3 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ import com.android.systemui.customization.R import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.dagger.qualifiers.DisplaySpecific import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.FeatureFlagsClassic import com.android.systemui.flags.Flags.REGION_SAMPLING import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor Loading @@ -47,7 +47,6 @@ import com.android.systemui.keyguard.shared.KeyguardShadeMigrationNssl import com.android.systemui.keyguard.shared.model.TransitionState import com.android.systemui.lifecycle.repeatWhenAttached import com.android.systemui.log.core.Logger import com.android.systemui.log.core.LogLevel.DEBUG import com.android.systemui.plugins.clocks.ClockController import com.android.systemui.plugins.clocks.ClockFaceController import com.android.systemui.plugins.clocks.ClockMessageBuffers Loading Loading @@ -92,7 +91,7 @@ constructor( @Main private val mainExecutor: DelayableExecutor, @Background private val bgExecutor: Executor, private val clockBuffers: ClockMessageBuffers, private val featureFlags: FeatureFlags, private val featureFlags: FeatureFlagsClassic, private val zenModeController: ZenModeController, ) { var loggers = listOf( Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +6 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,9 @@ public class KeyguardClockSwitch extends RelativeLayout { mSmallClockFrame = findViewById(R.id.lockscreen_clock_view); mLargeClockFrame = findViewById(R.id.lockscreen_clock_view_large); mStatusArea = findViewById(R.id.keyguard_status_area); } else { removeView(findViewById(R.id.lockscreen_clock_view)); removeView(findViewById(R.id.lockscreen_clock_view_large)); } onConfigChanged(); } Loading Loading @@ -263,6 +266,9 @@ public class KeyguardClockSwitch extends RelativeLayout { } void updateClockTargetRegions() { if (migrateClocksToBlueprint()) { return; } if (mClock != null) { if (mSmallClockFrame.isLaidOut()) { Rect targetRegion = getSmallClockRegion(mSmallClockFrame); Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +20 −8 Original line number Diff line number Diff line Loading @@ -246,8 +246,11 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS protected void onInit() { mKeyguardSliceViewController.init(); if (!migrateClocksToBlueprint()) { mSmallClockFrame = mView.findViewById(R.id.lockscreen_clock_view); mLargeClockFrame = mView.findViewById(R.id.lockscreen_clock_view_large); } if (!mOnlyClock) { mDumpManager.unregisterDumpable(getClass().getSimpleName()); // unregister previous Loading Loading @@ -526,7 +529,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS */ void updatePosition(int x, float scale, AnimationProperties props, boolean animate) { x = getCurrentLayoutDirection() == View.LAYOUT_DIRECTION_RTL ? -x : x; if (!migrateClocksToBlueprint()) { PropertyAnimator.setProperty(mSmallClockFrame, AnimatableProperty.TRANSLATION_X, x, props, animate); PropertyAnimator.setProperty(mLargeClockFrame, AnimatableProperty.SCALE_X, Loading @@ -534,6 +537,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS PropertyAnimator.setProperty(mLargeClockFrame, AnimatableProperty.SCALE_Y, scale, props, animate); } if (mStatusArea != null) { PropertyAnimator.setProperty(mStatusArea, KeyguardStatusAreaView.TRANSLATE_X_AOD, x, props, animate); Loading @@ -550,6 +555,10 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS return 0; } if (migrateClocksToBlueprint()) { return 0; } if (mLargeClockFrame.getVisibility() == View.VISIBLE) { // This gets the expected clock bottom if mLargeClockFrame had a top margin, but it's // top margin only contributed to height and didn't move the top of the view (as this Loading Loading @@ -581,6 +590,9 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS } boolean isClockTopAligned() { if (migrateClocksToBlueprint()) { return mKeyguardClockInteractor.getClockSize().getValue() == LARGE; } return mLargeClockFrame.getVisibility() != View.VISIBLE; } Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt +7 −1 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import com.android.systemui.keyguard.ui.view.KeyguardRootView import com.android.systemui.keyguard.ui.view.layout.KeyguardBlueprintCommandListener import com.android.systemui.keyguard.ui.viewmodel.AodAlphaViewModel import com.android.systemui.keyguard.ui.viewmodel.KeyguardBlueprintViewModel import com.android.systemui.keyguard.ui.viewmodel.KeyguardClockViewModel import com.android.systemui.keyguard.ui.viewmodel.KeyguardIndicationAreaViewModel import com.android.systemui.keyguard.ui.viewmodel.KeyguardRootViewModel import com.android.systemui.keyguard.ui.viewmodel.OccludingAppDeviceEntryMessageViewModel Loading Loading @@ -86,6 +87,7 @@ constructor( private val vibratorHelper: VibratorHelper, private val falsingManager: FalsingManager, private val aodAlphaViewModel: AodAlphaViewModel, private val keyguardClockViewModel: KeyguardClockViewModel, ) : CoreStartable { private var rootViewHandle: DisposableHandle? = null Loading Loading @@ -113,7 +115,11 @@ constructor( initializeViews() if (!SceneContainerFlag.isEnabled) { KeyguardBlueprintViewBinder.bind(keyguardRootView, keyguardBlueprintViewModel) KeyguardBlueprintViewBinder.bind( keyguardRootView, keyguardBlueprintViewModel, keyguardClockViewModel ) } keyguardBlueprintCommandListener.start() } Loading
packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardBlueprintRepository.kt +9 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.shared.model.KeyguardBlueprint import com.android.systemui.keyguard.ui.view.layout.blueprints.DefaultKeyguardBlueprint.Companion.DEFAULT import com.android.systemui.keyguard.ui.view.layout.blueprints.KeyguardBlueprintModule import com.android.systemui.keyguard.ui.view.layout.blueprints.transitions.IntraBlueprintTransitionType import com.android.systemui.keyguard.ui.view.layout.blueprints.transitions.IntraBlueprintTransitionType.DefaultTransition import java.io.PrintWriter import java.util.TreeMap import javax.inject.Inject Loading Loading @@ -54,6 +56,8 @@ constructor( TreeMap<String, KeyguardBlueprint>().apply { putAll(blueprints.associateBy { it.id }) } val blueprint: MutableStateFlow<KeyguardBlueprint> = MutableStateFlow(blueprintIdMap[DEFAULT]!!) val refreshBluePrint: MutableSharedFlow<Unit> = MutableSharedFlow(extraBufferCapacity = 1) val refreshBlueprintTransition: MutableSharedFlow<IntraBlueprintTransitionType> = MutableSharedFlow(extraBufferCapacity = 1) val configurationChange: Flow<Unit> = configurationRepository.onAnyConfigurationChange /** Loading Loading @@ -103,7 +107,12 @@ constructor( /** Re-emits the last emitted blueprint value if possible. */ fun refreshBlueprint() { refreshBlueprintWithTransition(DefaultTransition) } fun refreshBlueprintWithTransition(type: IntraBlueprintTransitionType = DefaultTransition) { refreshBluePrint.tryEmit(Unit) refreshBlueprintTransition.tryEmit(type) } /** Prints all available blueprints to the PrintWriter. */ Loading