summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorHui Yu <huiyu@google.com>2020-03-24 15:41:05 -0700
committerHui Yu <huiyu@google.com>2020-03-25 10:06:14 -0700
commit9b52815e714ff95a8191923edefd50a74f40ff26 (patch)
treef5e6d203aee4f04ef9157d0a0b21a81476ec8e00 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent3dc45fbc57c664539e97bc3031337aeb9643a90e (diff)
Add isUidActiveOrForeground() for camera/audio to use.
Currently CameraService calls isUidActive() before allowing the camera access. When start/resume activity, WindowManagerService start/resume the activity, then post a runnable to DiaplayThread and ActivityManagerService to update UidRecord's proc state, because the thread switch, the latency before proc state update is undetermined. When CameraService calls ActivityManagerService.isUidActive(), the proc state may not have been updated and camera access is denied. isUidActiveOrForeground() check isUidActive() first, if false, check isUidForeground() which is actually to check with WindowManagerService if the uid is foreground, which is equivalent to ActivityManagerService's uid active, just updated earlier. Bug: 151185692, 151777097, 109950150 Test: manual test. Change-Id: Iffed63293dbdb466e7955fe765ad2aa23a20b3ed
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions