Loading packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.deviceentry.domain.interactor import android.testing.TestableLooper import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.compose.animation.scene.SceneKey Loading Loading @@ -71,6 +72,7 @@ import org.junit.runner.RunWith @SmallTest @RunWith(AndroidJUnit4::class) @EnableSceneContainer @TestableLooper.RunWithLooper class DeviceEntryInteractorTest : SysuiTestCase() { private val kosmos = testKosmos() Loading packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/ui/binder/LiftToRunFaceAuthBinderTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ class LiftToRunFaceAuthBinderTest : SysuiTestCase() { @Captor private lateinit var triggerEventListenerCaptor: ArgumentCaptor<TriggerEventListener> @Mock private lateinit var mockSensor: Sensor private val underTest = kosmos.liftToRunFaceAuthBinder private val underTest by lazy { kosmos.liftToRunFaceAuthBinder } @Before fun setup() { Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/StatusBarStateControllerImplTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ class StatusBarStateControllerImplTest(flags: FlagsParameterization?) : SysuiTes object : StatusBarStateControllerImpl( uiEventLogger, kosmos.interactionJankMonitor, { kosmos.interactionJankMonitor }, JavaAdapter(testScope.backgroundScope), { kosmos.shadeInteractor }, { kosmos.deviceUnlockedInteractor }, Loading packages/SystemUI/src/com/android/systemui/shade/QuickSettingsControllerImpl.java +19 −17 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.systemui.shade; import static android.view.WindowInsets.Type.ime; import static com.android.internal.jank.InteractionJankMonitor.CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE; import static com.android.systemui.Flags.centralizedStatusBarHeightFix; import static com.android.systemui.classifier.Classifier.QS_COLLAPSE; import static com.android.systemui.shade.NotificationPanelViewController.COUNTER_PANEL_OPEN_QS; Loading Loading @@ -57,6 +56,7 @@ import androidx.annotation.NonNull; import com.android.app.animation.Interpolators; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.jank.Cuj; import com.android.internal.jank.InteractionJankMonitor; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto; Loading Loading @@ -153,7 +153,7 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum private final DeviceEntryFaceAuthInteractor mDeviceEntryFaceAuthInteractor; private final CastController mCastController; private final SplitShadeStateController mSplitShadeStateController; private final InteractionJankMonitor mInteractionJankMonitor; private final Lazy<InteractionJankMonitor> mInteractionJankMonitorLazy; private final ShadeRepository mShadeRepository; private final ShadeInteractor mShadeInteractor; private final ActiveNotificationsInteractor mActiveNotificationsInteractor; Loading Loading @@ -324,7 +324,7 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum AccessibilityManager accessibilityManager, LockscreenGestureLogger lockscreenGestureLogger, MetricsLogger metricsLogger, InteractionJankMonitor interactionJankMonitor, Lazy<InteractionJankMonitor> interactionJankMonitorLazy, ShadeLogger shadeLog, DumpManager dumpManager, DeviceEntryFaceAuthInteractor deviceEntryFaceAuthInteractor, Loading Loading @@ -375,7 +375,7 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum mShadeLog = shadeLog; mDeviceEntryFaceAuthInteractor = deviceEntryFaceAuthInteractor; mCastController = castController; mInteractionJankMonitor = interactionJankMonitor; mInteractionJankMonitorLazy = interactionJankMonitorLazy; mShadeRepository = shadeRepository; mShadeInteractor = shadeInteractor; mActiveNotificationsInteractor = activeNotificationsInteractor; Loading Loading @@ -2312,44 +2312,46 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum } void beginJankMonitoring(boolean isFullyCollapsed) { if (mInteractionJankMonitor == null) { InteractionJankMonitor monitor = mInteractionJankMonitorLazy.get(); if (monitor == null) { return; } // TODO (b/265193930): remove dependency on NPVC InteractionJankMonitor.Configuration.Builder builder = InteractionJankMonitor.Configuration.Builder.withView( InteractionJankMonitor.CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE, Cuj.CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE, mPanelView).setTag(isFullyCollapsed ? "Expand" : "Collapse"); mInteractionJankMonitor.begin(builder); monitor.begin(builder); } void endJankMonitoring() { if (mInteractionJankMonitor == null) { InteractionJankMonitor monitor = mInteractionJankMonitorLazy.get(); if (monitor == null) { return; } InteractionJankMonitor.getInstance().end( InteractionJankMonitor.CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE); monitor.end(Cuj.CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE); } void cancelJankMonitoring() { if (mInteractionJankMonitor == null) { InteractionJankMonitor monitor = mInteractionJankMonitorLazy.get(); if (monitor == null) { return; } InteractionJankMonitor.getInstance().cancel( InteractionJankMonitor.CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE); monitor.cancel(Cuj.CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE); } void traceQsJank(boolean startTracing, boolean wasCancelled) { if (mInteractionJankMonitor == null) { InteractionJankMonitor monitor = mInteractionJankMonitorLazy.get(); if (monitor == null) { return; } if (startTracing) { mInteractionJankMonitor.begin(mPanelView, CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE); monitor.begin(mPanelView, Cuj.CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE); } else { if (wasCancelled) { mInteractionJankMonitor.cancel(CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE); monitor.cancel(Cuj.CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE); } else { mInteractionJankMonitor.end(CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE); monitor.end(Cuj.CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE); } } } Loading packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java +12 −9 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ public class StatusBarStateControllerImpl implements private final ArrayList<RankedListener> mListeners = new ArrayList<>(); private final UiEventLogger mUiEventLogger; private final InteractionJankMonitor mInteractionJankMonitor; private final Lazy<InteractionJankMonitor> mInteractionJankMonitorLazy; private final JavaAdapter mJavaAdapter; private final Lazy<ShadeInteractor> mShadeInteractorLazy; private final Lazy<DeviceUnlockedInteractor> mDeviceUnlockedInteractorLazy; Loading Loading @@ -173,14 +173,14 @@ public class StatusBarStateControllerImpl implements @Inject public StatusBarStateControllerImpl( UiEventLogger uiEventLogger, InteractionJankMonitor interactionJankMonitor, Lazy<InteractionJankMonitor> interactionJankMonitorLazy, JavaAdapter javaAdapter, Lazy<ShadeInteractor> shadeInteractorLazy, Lazy<DeviceUnlockedInteractor> deviceUnlockedInteractorLazy, Lazy<SceneInteractor> sceneInteractorLazy, Lazy<KeyguardClockInteractor> keyguardClockInteractorLazy) { mUiEventLogger = uiEventLogger; mInteractionJankMonitor = interactionJankMonitor; mInteractionJankMonitorLazy = interactionJankMonitorLazy; mJavaAdapter = javaAdapter; mShadeInteractorLazy = shadeInteractorLazy; mDeviceUnlockedInteractorLazy = deviceUnlockedInteractorLazy; Loading Loading @@ -482,7 +482,8 @@ public class StatusBarStateControllerImpl implements private void beginInteractionJankMonitor() { final boolean shouldPost = (mIsDozing && mDozeAmount == 0) || (!mIsDozing && mDozeAmount == 1); if (mInteractionJankMonitor != null && mView != null && mView.isAttachedToWindow()) { InteractionJankMonitor monitor = mInteractionJankMonitorLazy.get(); if (monitor != null && mView != null && mView.isAttachedToWindow()) { if (shouldPost) { Choreographer.getInstance().postCallback( Choreographer.CALLBACK_ANIMATION, this::beginInteractionJankMonitor, null); Loading @@ -490,23 +491,25 @@ public class StatusBarStateControllerImpl implements Configuration.Builder builder = Configuration.Builder.withView(getCujType(), mView) .setTag(getClockId()) .setDeferMonitorForAnimationStart(false); mInteractionJankMonitor.begin(builder); monitor.begin(builder); } } } private void endInteractionJankMonitor() { if (mInteractionJankMonitor == null) { InteractionJankMonitor monitor = mInteractionJankMonitorLazy.get(); if (monitor == null) { return; } mInteractionJankMonitor.end(getCujType()); monitor.end(getCujType()); } private void cancelInteractionJankMonitor() { if (mInteractionJankMonitor == null) { InteractionJankMonitor monitor = mInteractionJankMonitorLazy.get(); if (monitor == null) { return; } mInteractionJankMonitor.cancel(getCujType()); monitor.cancel(getCujType()); } private int getCujType() { Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.deviceentry.domain.interactor import android.testing.TestableLooper import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.compose.animation.scene.SceneKey Loading Loading @@ -71,6 +72,7 @@ import org.junit.runner.RunWith @SmallTest @RunWith(AndroidJUnit4::class) @EnableSceneContainer @TestableLooper.RunWithLooper class DeviceEntryInteractorTest : SysuiTestCase() { private val kosmos = testKosmos() Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/ui/binder/LiftToRunFaceAuthBinderTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ class LiftToRunFaceAuthBinderTest : SysuiTestCase() { @Captor private lateinit var triggerEventListenerCaptor: ArgumentCaptor<TriggerEventListener> @Mock private lateinit var mockSensor: Sensor private val underTest = kosmos.liftToRunFaceAuthBinder private val underTest by lazy { kosmos.liftToRunFaceAuthBinder } @Before fun setup() { Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/StatusBarStateControllerImplTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ class StatusBarStateControllerImplTest(flags: FlagsParameterization?) : SysuiTes object : StatusBarStateControllerImpl( uiEventLogger, kosmos.interactionJankMonitor, { kosmos.interactionJankMonitor }, JavaAdapter(testScope.backgroundScope), { kosmos.shadeInteractor }, { kosmos.deviceUnlockedInteractor }, Loading
packages/SystemUI/src/com/android/systemui/shade/QuickSettingsControllerImpl.java +19 −17 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.systemui.shade; import static android.view.WindowInsets.Type.ime; import static com.android.internal.jank.InteractionJankMonitor.CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE; import static com.android.systemui.Flags.centralizedStatusBarHeightFix; import static com.android.systemui.classifier.Classifier.QS_COLLAPSE; import static com.android.systemui.shade.NotificationPanelViewController.COUNTER_PANEL_OPEN_QS; Loading Loading @@ -57,6 +56,7 @@ import androidx.annotation.NonNull; import com.android.app.animation.Interpolators; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.jank.Cuj; import com.android.internal.jank.InteractionJankMonitor; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto; Loading Loading @@ -153,7 +153,7 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum private final DeviceEntryFaceAuthInteractor mDeviceEntryFaceAuthInteractor; private final CastController mCastController; private final SplitShadeStateController mSplitShadeStateController; private final InteractionJankMonitor mInteractionJankMonitor; private final Lazy<InteractionJankMonitor> mInteractionJankMonitorLazy; private final ShadeRepository mShadeRepository; private final ShadeInteractor mShadeInteractor; private final ActiveNotificationsInteractor mActiveNotificationsInteractor; Loading Loading @@ -324,7 +324,7 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum AccessibilityManager accessibilityManager, LockscreenGestureLogger lockscreenGestureLogger, MetricsLogger metricsLogger, InteractionJankMonitor interactionJankMonitor, Lazy<InteractionJankMonitor> interactionJankMonitorLazy, ShadeLogger shadeLog, DumpManager dumpManager, DeviceEntryFaceAuthInteractor deviceEntryFaceAuthInteractor, Loading Loading @@ -375,7 +375,7 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum mShadeLog = shadeLog; mDeviceEntryFaceAuthInteractor = deviceEntryFaceAuthInteractor; mCastController = castController; mInteractionJankMonitor = interactionJankMonitor; mInteractionJankMonitorLazy = interactionJankMonitorLazy; mShadeRepository = shadeRepository; mShadeInteractor = shadeInteractor; mActiveNotificationsInteractor = activeNotificationsInteractor; Loading Loading @@ -2312,44 +2312,46 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum } void beginJankMonitoring(boolean isFullyCollapsed) { if (mInteractionJankMonitor == null) { InteractionJankMonitor monitor = mInteractionJankMonitorLazy.get(); if (monitor == null) { return; } // TODO (b/265193930): remove dependency on NPVC InteractionJankMonitor.Configuration.Builder builder = InteractionJankMonitor.Configuration.Builder.withView( InteractionJankMonitor.CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE, Cuj.CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE, mPanelView).setTag(isFullyCollapsed ? "Expand" : "Collapse"); mInteractionJankMonitor.begin(builder); monitor.begin(builder); } void endJankMonitoring() { if (mInteractionJankMonitor == null) { InteractionJankMonitor monitor = mInteractionJankMonitorLazy.get(); if (monitor == null) { return; } InteractionJankMonitor.getInstance().end( InteractionJankMonitor.CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE); monitor.end(Cuj.CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE); } void cancelJankMonitoring() { if (mInteractionJankMonitor == null) { InteractionJankMonitor monitor = mInteractionJankMonitorLazy.get(); if (monitor == null) { return; } InteractionJankMonitor.getInstance().cancel( InteractionJankMonitor.CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE); monitor.cancel(Cuj.CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE); } void traceQsJank(boolean startTracing, boolean wasCancelled) { if (mInteractionJankMonitor == null) { InteractionJankMonitor monitor = mInteractionJankMonitorLazy.get(); if (monitor == null) { return; } if (startTracing) { mInteractionJankMonitor.begin(mPanelView, CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE); monitor.begin(mPanelView, Cuj.CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE); } else { if (wasCancelled) { mInteractionJankMonitor.cancel(CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE); monitor.cancel(Cuj.CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE); } else { mInteractionJankMonitor.end(CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE); monitor.end(Cuj.CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE); } } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java +12 −9 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ public class StatusBarStateControllerImpl implements private final ArrayList<RankedListener> mListeners = new ArrayList<>(); private final UiEventLogger mUiEventLogger; private final InteractionJankMonitor mInteractionJankMonitor; private final Lazy<InteractionJankMonitor> mInteractionJankMonitorLazy; private final JavaAdapter mJavaAdapter; private final Lazy<ShadeInteractor> mShadeInteractorLazy; private final Lazy<DeviceUnlockedInteractor> mDeviceUnlockedInteractorLazy; Loading Loading @@ -173,14 +173,14 @@ public class StatusBarStateControllerImpl implements @Inject public StatusBarStateControllerImpl( UiEventLogger uiEventLogger, InteractionJankMonitor interactionJankMonitor, Lazy<InteractionJankMonitor> interactionJankMonitorLazy, JavaAdapter javaAdapter, Lazy<ShadeInteractor> shadeInteractorLazy, Lazy<DeviceUnlockedInteractor> deviceUnlockedInteractorLazy, Lazy<SceneInteractor> sceneInteractorLazy, Lazy<KeyguardClockInteractor> keyguardClockInteractorLazy) { mUiEventLogger = uiEventLogger; mInteractionJankMonitor = interactionJankMonitor; mInteractionJankMonitorLazy = interactionJankMonitorLazy; mJavaAdapter = javaAdapter; mShadeInteractorLazy = shadeInteractorLazy; mDeviceUnlockedInteractorLazy = deviceUnlockedInteractorLazy; Loading Loading @@ -482,7 +482,8 @@ public class StatusBarStateControllerImpl implements private void beginInteractionJankMonitor() { final boolean shouldPost = (mIsDozing && mDozeAmount == 0) || (!mIsDozing && mDozeAmount == 1); if (mInteractionJankMonitor != null && mView != null && mView.isAttachedToWindow()) { InteractionJankMonitor monitor = mInteractionJankMonitorLazy.get(); if (monitor != null && mView != null && mView.isAttachedToWindow()) { if (shouldPost) { Choreographer.getInstance().postCallback( Choreographer.CALLBACK_ANIMATION, this::beginInteractionJankMonitor, null); Loading @@ -490,23 +491,25 @@ public class StatusBarStateControllerImpl implements Configuration.Builder builder = Configuration.Builder.withView(getCujType(), mView) .setTag(getClockId()) .setDeferMonitorForAnimationStart(false); mInteractionJankMonitor.begin(builder); monitor.begin(builder); } } } private void endInteractionJankMonitor() { if (mInteractionJankMonitor == null) { InteractionJankMonitor monitor = mInteractionJankMonitorLazy.get(); if (monitor == null) { return; } mInteractionJankMonitor.end(getCujType()); monitor.end(getCujType()); } private void cancelInteractionJankMonitor() { if (mInteractionJankMonitor == null) { InteractionJankMonitor monitor = mInteractionJankMonitorLazy.get(); if (monitor == null) { return; } mInteractionJankMonitor.cancel(getCujType()); monitor.cancel(getCujType()); } private int getCujType() { Loading