summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorHui Yu <huiyu@google.com>2021-03-23 10:06:07 -0700
committerHui Yu <huiyu@google.com>2021-03-23 16:44:27 -0700
commit6706c1acc0eb1e8b30721940fe39b572edc225c2 (patch)
treede7dc7fc0d2083f8c43412ea9e52f9fa591dea0b /tools/aapt2/java/JavaClassGenerator_test.cpp
parente3e4c1f93da202166f91bcc079040b6f21c1b1da (diff)
Background startForeground() improvement.
Previously Service.startForeground() can be called from a background service and startForeground()/stopForeground() can be called repeatly from background. The BG-FGS-launch will add more restriction on this. 1. If the first startForeground() call is more than 10 seconds (can be configured by DeviceConfig key "fgs_start_foreground_timeout") after the Context.startService() call, check the service's app proc state and set mAllowWhileInUsePermissionInFgs and mAllowStartForeground flags again. 2. At Service.stopForeground() call, mAllowWhileInUsePermissionInFgs and mAllowStartForeground flags should be reset to false so FGS while-in-use permission and FGS BG start is not allowed. 3. After Context.startForegroundService()(or Context.startService()) -> Service.startForeground() -> Service.stopForeground(), the second or more times Service.startForeground() is called, check the service's app proc state and set mAllowWhileInUsePermissionInFgs and mAllowStartForeground flags again. Bug: 183204439 Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testStartForegroundTimeout Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testSecondStartForeground Change-Id: Idc88f274c7a323d175d65bb47eca041772ae9bb7
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions