Initial implementation of foreground service delegate feature.
A service module such as MediaSessionService, VOIP, Camera, Microphone, Location can ask ActivityManagerService to start a foreground service delegate on behalf of the actual app, by which the client app's process state can be promoted to FOREGROUND_SERVICE process state which is higher than the app's actual process state if the app is in the background. This can help to keep the app in the memory and extra run-time. The app does not need to define an actual service component nor add it into manifest file. Add shell command to start/stop delegate: adb shell am set-foreground-service-delegate packageName start|stop to start/stop foreground service delegate on a app's process. Note: only when the app can pass BG-FGS-start check, its FGS delegate is allowed to start. Bug: 256873819 Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsDelegateTest.java Change-Id: I54de7ad851f57a66d2e75e6fbc02aeafa619cc1b
Loading
Please register or sign in to comment