am: Add set-media-foreground-service command.
Changes add command to set media foreground service inactive:
am set-media-foreground-service inactive [--user USER_ID] <PACKAGE> <NOTIFICATION_ID>
e.g: adb shell am set-media-foreground-service inactive --user 0 com.spotify.music 2131430868
Notification ID associated with foreground service can be found out
using 'dumpsys activity services` and looking for foregrondId.
Flag: com.android.media.flags.enable_notifying_activity_manager_with_media_session_status_change
BUG: 281762171
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerNotifyMediaFGSTypeTest.java
Change-Id: Iad333b081c989b3164f2aa335361117c28b0bf7b
Signed-off-by:
Pradeep Sawlani <sawlani@google.com>
Loading
Please register or sign in to comment