Loading packages/SystemUI/multivalentTests/src/com/android/systemui/topwindoweffects/data/repository/SqueezeEffectRepositoryTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ class SqueezeEffectRepositoryTest : SysuiTestCase() { MockitoAnnotations.initMocks(this) } @DisableFlags(Flags.FLAG_ENABLE_LPP_SQUEEZE_EFFECT) @DisableFlags(Flags.FLAG_ENABLE_LPP_ASSIST_INVOCATION_EFFECT) @Test fun testSqueezeEffectDisabled_WhenFlagDisabled() = kosmos.runTest { Loading @@ -71,7 +71,7 @@ class SqueezeEffectRepositoryTest : SysuiTestCase() { assertThat(isSqueezeEffectEnabled).isFalse() } @EnableFlags(Flags.FLAG_ENABLE_LPP_SQUEEZE_EFFECT) @EnableFlags(Flags.FLAG_ENABLE_LPP_ASSIST_INVOCATION_EFFECT) @Test fun testSqueezeEffectDisabled_WhenFlagEnabled_GlobalSettingsDisabled() = kosmos.runTest { Loading @@ -82,7 +82,7 @@ class SqueezeEffectRepositoryTest : SysuiTestCase() { assertThat(isSqueezeEffectEnabled).isFalse() } @EnableFlags(Flags.FLAG_ENABLE_LPP_SQUEEZE_EFFECT) @EnableFlags(Flags.FLAG_ENABLE_LPP_ASSIST_INVOCATION_EFFECT) @Test fun testSqueezeEffectEnabled_WhenFlagEnabled_GlobalSettingEnabled() = kosmos.runTest { Loading packages/SystemUI/src/com/android/systemui/topwindoweffects/data/repository/SqueezeEffectRepositoryImpl.kt +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ class SqueezeEffectRepositoryImpl @Inject constructor( }.flowOn(bgCoroutineContext) private val squeezeEffectEnabled get() = Flags.enableLppSqueezeEffect() && globalSettings.getInt( get() = Flags.enableLppAssistInvocationEffect() && globalSettings.getInt( POWER_BUTTON_LONG_PRESS, R.integer.config_longPressOnPowerBehavior ) == 5 // 5 corresponds to launch assistant in config_longPressOnPowerBehavior Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ import static com.android.server.wm.WindowManagerPolicyProto.ROTATION; import static com.android.server.wm.WindowManagerPolicyProto.ROTATION_MODE; import static com.android.server.wm.WindowManagerPolicyProto.SCREEN_ON_FULLY; import static com.android.server.wm.WindowManagerPolicyProto.WINDOW_MANAGER_DRAW_COMPLETE; import static com.android.systemui.shared.Flags.enableLppSqueezeEffect; import static com.android.systemui.shared.Flags.enableLppAssistInvocationEffect; import android.accessibilityservice.AccessibilityService; import android.annotation.Nullable; Loading Loading @@ -1505,7 +1505,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { // Sending a synthetic KeyEvent to StatusBar service with flag FLAG_LONG_PRESS set, when // power button is long pressed if (enableLppSqueezeEffect()) { if (enableLppAssistInvocationEffect()) { // Long press is detected in a callback, so there's no explicit hardware KeyEvent // available here. Instead, we create a synthetic power key event that has properties // similar to the original one. Loading services/tests/wmtests/src/com/android/server/policy/PowerKeyGestureTests.java +2 −2 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ public class PowerKeyGestureTests extends ShortcutKeyTestBase { mPhoneWindowManager.assertNoPowerSleep(); } @EnableFlags(Flags.FLAG_ENABLE_LPP_SQUEEZE_EFFECT) @EnableFlags(Flags.FLAG_ENABLE_LPP_ASSIST_INVOCATION_EFFECT) @Test public void testPowerLongPress_flagEnabled_shouldSendSyntheticKeyEvent() throws RemoteException { Loading @@ -189,7 +189,7 @@ public class PowerKeyGestureTests extends ShortcutKeyTestBase { verifier.assertReceivedKey(allOf(withKeyCode(KEYCODE_POWER), withKeyAction(ACTION_UP))); } @DisableFlags(Flags.FLAG_ENABLE_LPP_SQUEEZE_EFFECT) @DisableFlags(Flags.FLAG_ENABLE_LPP_ASSIST_INVOCATION_EFFECT) @Test public void testPowerLongPress_flagDisabled_shouldNotSendSyntheticKeyEvent() throws RemoteException { Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/topwindoweffects/data/repository/SqueezeEffectRepositoryTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ class SqueezeEffectRepositoryTest : SysuiTestCase() { MockitoAnnotations.initMocks(this) } @DisableFlags(Flags.FLAG_ENABLE_LPP_SQUEEZE_EFFECT) @DisableFlags(Flags.FLAG_ENABLE_LPP_ASSIST_INVOCATION_EFFECT) @Test fun testSqueezeEffectDisabled_WhenFlagDisabled() = kosmos.runTest { Loading @@ -71,7 +71,7 @@ class SqueezeEffectRepositoryTest : SysuiTestCase() { assertThat(isSqueezeEffectEnabled).isFalse() } @EnableFlags(Flags.FLAG_ENABLE_LPP_SQUEEZE_EFFECT) @EnableFlags(Flags.FLAG_ENABLE_LPP_ASSIST_INVOCATION_EFFECT) @Test fun testSqueezeEffectDisabled_WhenFlagEnabled_GlobalSettingsDisabled() = kosmos.runTest { Loading @@ -82,7 +82,7 @@ class SqueezeEffectRepositoryTest : SysuiTestCase() { assertThat(isSqueezeEffectEnabled).isFalse() } @EnableFlags(Flags.FLAG_ENABLE_LPP_SQUEEZE_EFFECT) @EnableFlags(Flags.FLAG_ENABLE_LPP_ASSIST_INVOCATION_EFFECT) @Test fun testSqueezeEffectEnabled_WhenFlagEnabled_GlobalSettingEnabled() = kosmos.runTest { Loading
packages/SystemUI/src/com/android/systemui/topwindoweffects/data/repository/SqueezeEffectRepositoryImpl.kt +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ class SqueezeEffectRepositoryImpl @Inject constructor( }.flowOn(bgCoroutineContext) private val squeezeEffectEnabled get() = Flags.enableLppSqueezeEffect() && globalSettings.getInt( get() = Flags.enableLppAssistInvocationEffect() && globalSettings.getInt( POWER_BUTTON_LONG_PRESS, R.integer.config_longPressOnPowerBehavior ) == 5 // 5 corresponds to launch assistant in config_longPressOnPowerBehavior Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ import static com.android.server.wm.WindowManagerPolicyProto.ROTATION; import static com.android.server.wm.WindowManagerPolicyProto.ROTATION_MODE; import static com.android.server.wm.WindowManagerPolicyProto.SCREEN_ON_FULLY; import static com.android.server.wm.WindowManagerPolicyProto.WINDOW_MANAGER_DRAW_COMPLETE; import static com.android.systemui.shared.Flags.enableLppSqueezeEffect; import static com.android.systemui.shared.Flags.enableLppAssistInvocationEffect; import android.accessibilityservice.AccessibilityService; import android.annotation.Nullable; Loading Loading @@ -1505,7 +1505,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { // Sending a synthetic KeyEvent to StatusBar service with flag FLAG_LONG_PRESS set, when // power button is long pressed if (enableLppSqueezeEffect()) { if (enableLppAssistInvocationEffect()) { // Long press is detected in a callback, so there's no explicit hardware KeyEvent // available here. Instead, we create a synthetic power key event that has properties // similar to the original one. Loading
services/tests/wmtests/src/com/android/server/policy/PowerKeyGestureTests.java +2 −2 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ public class PowerKeyGestureTests extends ShortcutKeyTestBase { mPhoneWindowManager.assertNoPowerSleep(); } @EnableFlags(Flags.FLAG_ENABLE_LPP_SQUEEZE_EFFECT) @EnableFlags(Flags.FLAG_ENABLE_LPP_ASSIST_INVOCATION_EFFECT) @Test public void testPowerLongPress_flagEnabled_shouldSendSyntheticKeyEvent() throws RemoteException { Loading @@ -189,7 +189,7 @@ public class PowerKeyGestureTests extends ShortcutKeyTestBase { verifier.assertReceivedKey(allOf(withKeyCode(KEYCODE_POWER), withKeyAction(ACTION_UP))); } @DisableFlags(Flags.FLAG_ENABLE_LPP_SQUEEZE_EFFECT) @DisableFlags(Flags.FLAG_ENABLE_LPP_ASSIST_INVOCATION_EFFECT) @Test public void testPowerLongPress_flagDisabled_shouldNotSendSyntheticKeyEvent() throws RemoteException { Loading