summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/volume/panel/component/bottombar/ui/viewmodel/BottomBarViewModelTest.kt13
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/panel/component/bottombar/ui/viewmodel/BottomBarViewModel.kt15
2 files changed, 21 insertions, 7 deletions
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/panel/component/bottombar/ui/viewmodel/BottomBarViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/panel/component/bottombar/ui/viewmodel/BottomBarViewModelTest.kt
index 8e925573d40a..2cc1ad335535 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/panel/component/bottombar/ui/viewmodel/BottomBarViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/panel/component/bottombar/ui/viewmodel/BottomBarViewModelTest.kt
@@ -84,8 +84,17 @@ class BottomBarViewModelTest : SysuiTestCase() {
runCurrent()
- verify(activityStarter).startActivity(capture(intentCaptor), eq(true),
- capture(activityStartedCaptor))
+ verify(activityStarter)
+ .startActivityDismissingKeyguard(
+ /* intent = */ capture(intentCaptor),
+ /* onlyProvisioned = */ eq(false),
+ /* dismissShade = */ eq(true),
+ /* disallowEnterPictureInPictureWhileLaunching = */ eq(false),
+ /* callback = */ capture(activityStartedCaptor),
+ /* flags = */ eq(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT),
+ /* animationController = */ eq(null),
+ /* userHandle = */ eq(null),
+ )
assertThat(intentCaptor.value.action).isEqualTo(Settings.ACTION_SOUND_SETTINGS)
activityStartedCaptor.value.onActivityStarted(ActivityManager.START_SUCCESS)
diff --git a/packages/SystemUI/src/com/android/systemui/volume/panel/component/bottombar/ui/viewmodel/BottomBarViewModel.kt b/packages/SystemUI/src/com/android/systemui/volume/panel/component/bottombar/ui/viewmodel/BottomBarViewModel.kt
index 0207d6e8e8c2..04d7b1fa6532 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/panel/component/bottombar/ui/viewmodel/BottomBarViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/volume/panel/component/bottombar/ui/viewmodel/BottomBarViewModel.kt
@@ -36,10 +36,15 @@ constructor(
}
fun onSettingsClicked() {
- activityStarter.startActivity(
- Intent(Settings.ACTION_SOUND_SETTINGS)
- .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT),
- true,
- ) { volumePanelViewModel.dismissPanel() }
+ activityStarter.startActivityDismissingKeyguard(
+ /* intent = */ Intent(Settings.ACTION_SOUND_SETTINGS),
+ /* onlyProvisioned = */ false,
+ /* dismissShade = */ true,
+ /* disallowEnterPictureInPictureWhileLaunching = */ false,
+ /* callback = */ { volumePanelViewModel.dismissPanel() },
+ /* flags = */ Intent.FLAG_ACTIVITY_REORDER_TO_FRONT,
+ /* animationController = */ null,
+ /* userHandle = */ null,
+ )
}
}