summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorHui Yu <huiyu@google.com>2021-03-29 12:47:35 -0700
committerHui Yu <huiyu@google.com>2021-04-19 10:34:28 -0700
commit36429f87de254c390a4ca124dd95e0b1b7c6277b (patch)
treeaff1c398aa4df6bc4c8ca891d83a7d6de12ae176 /tools/aapt2/java/JavaClassGenerator_test.cpp
parentef9e6a7ce0022111c4dbedb050170997b4c80020 (diff)
Allow FGS started from MediaButtonReceiver to have while-in-use
permissions. 1. Create a generic FgsTempAllowList class, mFgsStartTempAllowList and mFgsWhileInUseTempAllowList are instantiated from FgsTempAllowList. 2. For mFgsWhileInUseTempAllowList, the uid on this list is allowed to have while-in-use permission when the FGS is started from background for a duration of time. 3. When media button is pressed, the targetUid is added to mFgsWhileInUseTempAllowList, for the duration of 10 seconds, this way the targetUid can start FGS from background and have while-in-use permission. 4. When checking for ProcessRecord. mAllowBackgroundActivityStartsTokens, it is the caller app's ProcessRecord should be checked instead of the service's ProcessRecord. Bug: 182481312 Test: use b/167998084 reproduce steps, make a voip call, the receiver side screen is unlocked, the receiver side uses bluetooth headset button to pick up the call, "dumpsys activity -a" shows the FGS has "allowWhileInUsePermissionInFgs=true" and "isForeground=true". Change-Id: Ic80aefe4202fe2210881bb8eea24b6e34cb1e7d0
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions