summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorwilsonshih <wilsonshih@google.com>2020-07-10 10:45:23 +0800
committerWei Sheng Shih <wilsonshih@google.com>2020-07-31 10:01:05 +0000
commit6607196afb44cf3e000ba0e98e403d72df231062 (patch)
tree1c1e3499fadc083d354a7b0fefc9a604cdfb8121 /tools/aapt2/java/JavaClassGenerator.cpp
parentb8c40cdebefed3e8f5d2b578d4e2d0595b47bb4e (diff)
Prevent sleep tokens from being created recursively.
Sometimes a keyguard sleep token can be created with recursively call because we use the local object existing as a condition to create it. The code flow looks like: KeyguardController#updateSleepToken if (mSleepToken == null) then a = acquireSleepToken(); acquireSleepToken updateSleepIfNeededLocked ensureActivitiesVisible keyguardController#visibilitiesUpdated updateSleepToken Then since the local mSleepToken haven't been assigned, acquireSleepToken would be called again. Which would create another sleep token and leave the previous one in RootWindowContainer. To prevent this from happening again, separate updateSleepIfNeeded from acquireSleepToken, and store sleep token as a map, so no more sleep token can be created with same key. Bug: 162441580 Test: atest MultiDisplayKeyguardTests MultiDisplayLockedKeyguardTests/ KeyguardTests KeyguardInputTests KeyguardLockedTests Change-Id: I168dfe0fa101cb65eb676ca256c03439c8e4193d Merged-In: I168dfe0fa101cb65eb676ca256c03439c8e4193d (cherry picked from commit 3f51a96792d3770d82efcad645714ea8445a445f)
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions