summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorwilsonshih <wilsonshih@google.com>2020-07-10 10:45:23 +0800
committerwilsonshih <wilsonshih@google.com>2020-07-20 12:27:02 +0800
commit3f51a96792d3770d82efcad645714ea8445a445f (patch)
tree3b826900d494823f21219959b3a5512e46d995b0 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent4cc7111329edcc0d89a3f352669127decdbd8a0a (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: 160351101 Test: atest MultiDisplayKeyguardTests MultiDisplayLockedKeyguardTests/ KeyguardTests KeyguardInputTests KeyguardLockedTests Change-Id: I168dfe0fa101cb65eb676ca256c03439c8e4193d
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions