Loading packages/SystemUI/tests/utils/src/com/android/systemui/flags/SceneContainerRule.kt +14 −13 Original line number Diff line number Diff line Loading @@ -40,22 +40,23 @@ class SceneContainerRule : TestRule { "\n * Did you forget to add a new aconfig flag dependency in" + " @EnableSceneContainer?" + "\n * Did you forget to use SetFlagsRule with an earlier order?", SceneContainerFlag.isEnabled SceneContainerFlag.isEnabled, ) } // Get the flag value, treating the unset error as false. val sceneContainerAconfigEnabled = try { val sceneContainerAconfigEnabled = try { com.android.systemui.Flags.sceneContainer() } catch (e: Exception) { false } if (sceneContainerAconfigEnabled) { if (sceneContainerAconfigEnabled && SceneContainerFlag.isEnabledOnVariant) { Assert.assertTrue( "FLAG_SCENE_CONTAINER is enabled but SceneContainerFlag.isEnabled" + " is false. Use `.andSceneContainer()` from" + " SceneContainerFlagParameterization.kt to parameterize this" + " flag correctly.", SceneContainerFlag.isEnabled SceneContainerFlag.isEnabled, ) } if ( Loading @@ -67,7 +68,7 @@ class SceneContainerRule : TestRule { if (exception is AssumptionViolatedException) { throw AssertionError( "This is marked @BrokenWithSceneContainer, but was skipped.", exception exception, ) } throw AssumptionViolatedException("Test is still broken", exception) Loading Loading
packages/SystemUI/tests/utils/src/com/android/systemui/flags/SceneContainerRule.kt +14 −13 Original line number Diff line number Diff line Loading @@ -40,22 +40,23 @@ class SceneContainerRule : TestRule { "\n * Did you forget to add a new aconfig flag dependency in" + " @EnableSceneContainer?" + "\n * Did you forget to use SetFlagsRule with an earlier order?", SceneContainerFlag.isEnabled SceneContainerFlag.isEnabled, ) } // Get the flag value, treating the unset error as false. val sceneContainerAconfigEnabled = try { val sceneContainerAconfigEnabled = try { com.android.systemui.Flags.sceneContainer() } catch (e: Exception) { false } if (sceneContainerAconfigEnabled) { if (sceneContainerAconfigEnabled && SceneContainerFlag.isEnabledOnVariant) { Assert.assertTrue( "FLAG_SCENE_CONTAINER is enabled but SceneContainerFlag.isEnabled" + " is false. Use `.andSceneContainer()` from" + " SceneContainerFlagParameterization.kt to parameterize this" + " flag correctly.", SceneContainerFlag.isEnabled SceneContainerFlag.isEnabled, ) } if ( Loading @@ -67,7 +68,7 @@ class SceneContainerRule : TestRule { if (exception is AssumptionViolatedException) { throw AssertionError( "This is marked @BrokenWithSceneContainer, but was skipped.", exception exception, ) } throw AssumptionViolatedException("Test is still broken", exception) Loading