Loading packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ class DefaultClockController( protected var onSecondaryDisplay: Boolean = false override val events: DefaultClockEvents override val config = ClockConfig() override val config = ClockConfig(DEFAULT_CLOCK_ID) init { val parent = FrameLayout(ctx) Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockProviderPlugin.kt +2 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,8 @@ data class ClockMetadata( /** Render configuration for the full clock. Modifies the way systemUI behaves with this clock. */ data class ClockConfig( val id: String, /** Transition to AOD should move smartspace like large clock instead of small clock */ val useAlternateSmartspaceAODTransition: Boolean = false, Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +9 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import java.lang.annotation.RetentionPolicy; public class KeyguardClockSwitch extends RelativeLayout { private static final String TAG = "KeyguardClockSwitch"; public static final String MISSING_CLOCK_ID = "CLOCK_MISSING"; private static final long CLOCK_OUT_MILLIS = 133; private static final long CLOCK_IN_MILLIS = 167; Loading Loading @@ -192,6 +193,14 @@ public class KeyguardClockSwitch extends RelativeLayout { return mLogBuffer; } /** Returns the id of the currently rendering clock */ public String getClockId() { if (mClock == null) { return MISSING_CLOCK_ID; } return mClock.getConfig().getId(); } void setClock(ClockController clock, int statusBarState) { mClock = clock; Loading packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java +22 −0 Original line number Diff line number Diff line Loading @@ -48,8 +48,10 @@ import com.android.internal.annotations.VisibleForTesting; import com.android.internal.jank.InteractionJankMonitor; import com.android.internal.jank.InteractionJankMonitor.Configuration; import com.android.internal.logging.UiEventLogger; import com.android.keyguard.KeyguardClockSwitch; import com.android.systemui.DejankUtils; import com.android.systemui.Dumpable; import com.android.systemui.R; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dump.DumpManager; import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener; Loading Loading @@ -420,6 +422,25 @@ public class StatusBarStateControllerImpl implements } } /** Returns the id of the currently rendering clock */ public String getClockId() { if (mView == null) { return KeyguardClockSwitch.MISSING_CLOCK_ID; } View clockSwitch = mView.findViewById(R.id.keyguard_clock_container); if (clockSwitch == null) { Log.e(TAG, "Clock container was missing"); return KeyguardClockSwitch.MISSING_CLOCK_ID; } if (!(clockSwitch instanceof KeyguardClockSwitch)) { Log.e(TAG, "Clock container was incorrect type: " + clockSwitch); return KeyguardClockSwitch.MISSING_CLOCK_ID; } return ((KeyguardClockSwitch) clockSwitch).getClockId(); } private void beginInteractionJankMonitor() { final boolean shouldPost = (mIsDozing && mDozeAmount == 0) || (!mIsDozing && mDozeAmount == 1); Loading @@ -429,6 +450,7 @@ public class StatusBarStateControllerImpl implements Choreographer.CALLBACK_ANIMATION, this::beginInteractionJankMonitor, null); } else { Configuration.Builder builder = Configuration.Builder.withView(getCujType(), mView) .setTag(getClockId()) .setDeferMonitorForAnimationStart(false); mInteractionJankMonitor.begin(builder); } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt +8 −4 Original line number Diff line number Diff line Loading @@ -223,10 +223,14 @@ class UnlockedScreenOffAnimationController @Inject constructor( } .setCustomInterpolator(View.ALPHA, Interpolators.FAST_OUT_SLOW_IN), true /* animate */) interactionJankMonitor.begin( notifShadeWindowControllerLazy.get().windowRootView, CUJ_SCREEN_OFF_SHOW_AOD val builder = InteractionJankMonitor.Configuration.Builder .withView( InteractionJankMonitor.CUJ_SCREEN_OFF_SHOW_AOD, notifShadeWindowControllerLazy.get().windowRootView ) .setTag(statusBarStateControllerImpl.getClockId()) interactionJankMonitor.begin(builder) } override fun onStartedWakingUp() { Loading Loading
packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ class DefaultClockController( protected var onSecondaryDisplay: Boolean = false override val events: DefaultClockEvents override val config = ClockConfig() override val config = ClockConfig(DEFAULT_CLOCK_ID) init { val parent = FrameLayout(ctx) Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockProviderPlugin.kt +2 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,8 @@ data class ClockMetadata( /** Render configuration for the full clock. Modifies the way systemUI behaves with this clock. */ data class ClockConfig( val id: String, /** Transition to AOD should move smartspace like large clock instead of small clock */ val useAlternateSmartspaceAODTransition: Boolean = false, Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +9 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import java.lang.annotation.RetentionPolicy; public class KeyguardClockSwitch extends RelativeLayout { private static final String TAG = "KeyguardClockSwitch"; public static final String MISSING_CLOCK_ID = "CLOCK_MISSING"; private static final long CLOCK_OUT_MILLIS = 133; private static final long CLOCK_IN_MILLIS = 167; Loading Loading @@ -192,6 +193,14 @@ public class KeyguardClockSwitch extends RelativeLayout { return mLogBuffer; } /** Returns the id of the currently rendering clock */ public String getClockId() { if (mClock == null) { return MISSING_CLOCK_ID; } return mClock.getConfig().getId(); } void setClock(ClockController clock, int statusBarState) { mClock = clock; Loading
packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java +22 −0 Original line number Diff line number Diff line Loading @@ -48,8 +48,10 @@ import com.android.internal.annotations.VisibleForTesting; import com.android.internal.jank.InteractionJankMonitor; import com.android.internal.jank.InteractionJankMonitor.Configuration; import com.android.internal.logging.UiEventLogger; import com.android.keyguard.KeyguardClockSwitch; import com.android.systemui.DejankUtils; import com.android.systemui.Dumpable; import com.android.systemui.R; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dump.DumpManager; import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener; Loading Loading @@ -420,6 +422,25 @@ public class StatusBarStateControllerImpl implements } } /** Returns the id of the currently rendering clock */ public String getClockId() { if (mView == null) { return KeyguardClockSwitch.MISSING_CLOCK_ID; } View clockSwitch = mView.findViewById(R.id.keyguard_clock_container); if (clockSwitch == null) { Log.e(TAG, "Clock container was missing"); return KeyguardClockSwitch.MISSING_CLOCK_ID; } if (!(clockSwitch instanceof KeyguardClockSwitch)) { Log.e(TAG, "Clock container was incorrect type: " + clockSwitch); return KeyguardClockSwitch.MISSING_CLOCK_ID; } return ((KeyguardClockSwitch) clockSwitch).getClockId(); } private void beginInteractionJankMonitor() { final boolean shouldPost = (mIsDozing && mDozeAmount == 0) || (!mIsDozing && mDozeAmount == 1); Loading @@ -429,6 +450,7 @@ public class StatusBarStateControllerImpl implements Choreographer.CALLBACK_ANIMATION, this::beginInteractionJankMonitor, null); } else { Configuration.Builder builder = Configuration.Builder.withView(getCujType(), mView) .setTag(getClockId()) .setDeferMonitorForAnimationStart(false); mInteractionJankMonitor.begin(builder); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt +8 −4 Original line number Diff line number Diff line Loading @@ -223,10 +223,14 @@ class UnlockedScreenOffAnimationController @Inject constructor( } .setCustomInterpolator(View.ALPHA, Interpolators.FAST_OUT_SLOW_IN), true /* animate */) interactionJankMonitor.begin( notifShadeWindowControllerLazy.get().windowRootView, CUJ_SCREEN_OFF_SHOW_AOD val builder = InteractionJankMonitor.Configuration.Builder .withView( InteractionJankMonitor.CUJ_SCREEN_OFF_SHOW_AOD, notifShadeWindowControllerLazy.get().windowRootView ) .setTag(statusBarStateControllerImpl.getClockId()) interactionJankMonitor.begin(builder) } override fun onStartedWakingUp() { Loading