Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit dd3a96a3 authored by Pradeep Sawlani's avatar Pradeep Sawlani
Browse files

Add systemRequestedFgToBg flag to ServiceRecord for system-initated transistions.



This commit introduces a boolean to track if last service transistion to
background was done by system. This is useful in cases where service
state is managed by system.

Example:
when a media session transistions from playing  to stop/pause,
system moves app hosted media service to background. Similarly when
media session transistion back to playing, system moves app hosted media
service to foreground. If app explicitly requests service to be in
background via #StopForeground() call, system should respect that.

Test: atest cts/tests/app/src/android/app/cts/ActivityManagerNotifyMediaFGSTypeTest.java
Flag: com.android.media.flags.enable_notifying_activity_manager_with_media_session_status_change
BUG: 281762171

Change-Id: Ib10a2700b3d083144804db12ef929f9d1869cebe
Signed-off-by: default avatarPradeep Sawlani <sawlani@google.com>
parent 80f15bd5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment