diff options
| author | 2022-10-24 22:47:02 +0000 | |
|---|---|---|
| committer | 2022-11-16 04:43:36 +0000 | |
| commit | 659beaad8ed5567409b17d109e03f16b1b62780f (patch) | |
| tree | f301a8f65eec5f04ad7be99d95fb6a577c939e26 /libs/androidfw/StringPool.cpp | |
| parent | 1abfc04d6716178a157f4779325b8f74fd24e055 (diff) | |
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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions