summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Justin Weir <justinweir@google.com> 2024-04-15 09:32:56 -0400
committer Justin Weir <justinweir@google.com> 2024-04-16 17:24:57 +0000
commitc95da3eaeace12740a2c81a78c68356d31f20a48 (patch)
treea24f7a2c53670323c5a779dc8a0fbf5c473f4b53
parente475d13842efb71f30de76a86ae91fe6b8e25a3d (diff)
Follow up for ag/26908611
This addresses some minor comments in ag/26908611. We decided to submit and fix in a second CL because the original touched a lot of files and was vulnerable to a prolonged cycle of merge conflicts and retests if we didn't merge when we could. Fixes: 333775705 Test: updated and ran affected tests Flag: ACONFIG com.android.systemui.scene_container DEVELOPMENT Change-Id: I4b05c268acad827c110d041b12979e6e486719ea
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt3
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerBaseTest.java3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java7
4 files changed, 12 insertions, 7 deletions
diff --git a/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt
index ae9794a3dbda..ed2d20c001f6 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt
@@ -66,6 +66,7 @@ import com.android.systemui.plugins.FalsingManager
import com.android.systemui.res.R
import com.android.systemui.scene.domain.interactor.SceneInteractor
import com.android.systemui.scene.domain.interactor.sceneInteractor
+import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.scene.shared.model.FakeSceneDataSource
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.fakeSceneDataSource
@@ -216,7 +217,7 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() {
mSetFlagsRule.disableFlags(
FLAG_SIDEFPS_CONTROLLER_REFACTOR,
)
- if (!com.android.systemui.Flags.sceneContainer()) {
+ if (!SceneContainerFlag.isEnabled) {
mSetFlagsRule.disableFlags(
AConfigFlags.FLAG_KEYGUARD_WM_STATE_REFACTOR,
AConfigFlags.FLAG_REFACTOR_KEYGUARD_DISMISS_INTENT,
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt
index 427b66bcff8a..ea95aab4a1c4 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt
@@ -51,9 +51,9 @@ class SceneContainerViewModelTest : SysuiTestCase() {
private val kosmos = testKosmos()
private val testScope by lazy { kosmos.testScope }
private val sceneInteractor by lazy { kosmos.sceneInteractor }
- private val fakeSceneDataSource = kosmos.fakeSceneDataSource
- private val sceneContainerConfig = kosmos.sceneContainerConfig
- private val falsingManager = kosmos.fakeFalsingManager
+ private val fakeSceneDataSource by lazy { kosmos.fakeSceneDataSource }
+ private val sceneContainerConfig by lazy { kosmos.sceneContainerConfig }
+ private val falsingManager by lazy { kosmos.fakeFalsingManager }
private lateinit var underTest: SceneContainerViewModel
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerBaseTest.java
index bcea4116d169..b09357f853b9 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerBaseTest.java
@@ -52,6 +52,7 @@ import com.android.systemui.kosmos.KosmosJavaAdapter;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.res.R;
+import com.android.systemui.scene.shared.flag.SceneContainerFlag;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.VibratorHelper;
import com.android.systemui.statusbar.policy.ConfigurationController;
@@ -148,7 +149,7 @@ public class LegacyLockIconViewControllerBaseTest extends SysuiTestCase {
when(mStatusBarStateController.isDozing()).thenReturn(false);
when(mStatusBarStateController.getState()).thenReturn(StatusBarState.KEYGUARD);
- if (!Flags.sceneContainer()) {
+ if (!SceneContainerFlag.isEnabled()) {
mSetFlagsRule.disableFlags(Flags.FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR);
mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
index 5c651035262d..041e61c9f36f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
@@ -102,6 +102,7 @@ import com.android.systemui.communal.domain.interactor.CommunalInteractor;
import com.android.systemui.communal.shared.model.CommunalScenes;
import com.android.systemui.demomode.DemoModeController;
import com.android.systemui.dump.DumpManager;
+import com.android.systemui.flags.DisableSceneContainer;
import com.android.systemui.flags.EnableSceneContainer;
import com.android.systemui.flags.FakeFeatureFlags;
import com.android.systemui.flags.Flags;
@@ -122,6 +123,7 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.power.domain.interactor.PowerInteractor;
import com.android.systemui.res.R;
import com.android.systemui.scene.domain.interactor.WindowRootViewVisibilityInteractor;
+import com.android.systemui.scene.shared.flag.SceneContainerFlag;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.settings.brightness.BrightnessSliderController;
import com.android.systemui.settings.brightness.domain.interactor.BrightnessMirrorShowingInteractor;
@@ -350,7 +352,7 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
// Turn AOD on and toggle feature flag for jank fixes
mFeatureFlags.set(Flags.ZJ_285570694_LOCKSCREEN_TRANSITION_FROM_AOD, true);
when(mDozeParameters.getAlwaysOn()).thenReturn(true);
- if (!com.android.systemui.Flags.sceneContainer()) {
+ if (!SceneContainerFlag.isEnabled()) {
mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR);
}
@@ -427,7 +429,7 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
((Runnable) invocation.getArgument(0)).run();
return null;
}).when(mNotificationShadeWindowController).batchApplyWindowLayoutParams(any());
- if (com.android.systemui.Flags.sceneContainer()) {
+ if (SceneContainerFlag.isEnabled()) {
mShadeController = spy(mKosmos.getShadeController());
} else {
mShadeController = spy(new ShadeControllerImpl(
@@ -1114,6 +1116,7 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
public void brightnesShowingChanged_flagDisabled_ScrimControllerNotified() {
mCentralSurfaces.registerCallbacks();