summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authornathch <nathch@google.com>2019-07-24 18:11:40 +0100
committerChandan Nath <nathch@google.com>2019-07-24 17:46:09 +0000
commit842369a82bad306f1ea5e2b74395f2651c54b117 (patch)
treee106ba0d4334cc8f414223f18d8a0e46c01a4b6a /tools/aapt2/java/JavaClassGenerator_test.cpp
parentdc860bdfa8da9a2532aa12da2eb946751c1df558 (diff)
DO NOT MERGE Add stop method to backup handler thread.
Currently we call .quit() on the underlying thread which will cause all messages to stop being processed. This has the side effect that, because the backup system is a state machine where the state transitions are messages, the message to transition into a state where the WakeLock is released may not occur when a user is torn down. This change adds a stop method we can call instead of .quit() on the thread which drops any remaining messages and then releases the WakeLock. We also wrap the wakelock acquire/release calls to prevent any acquire/release on the underlying wakelock after a quit. For the acquire, this avoids a non-released wakelock and for the release, this avoids a runtime exception which can happen when we release a released wakelock Test: atest CtsBackupTestCases CtsBackupHostTestCases Test: m RunBackupFrameworksServicesRoboTests && atest RunBackupFrameworksServicesRoboTests Test: blaze run -- //experimental/users/nathch/py/bug_repros:repro 136264323 -m acquire_quit -log DEBUG Test: blaze run -- //experimental/users/nathch/py/bug_repros:repro 136264323 -m quit_acquire -log DEBUG Test: blaze run -- //experimental/users/nathch/py/bug_repros:repro 136264323 -m acquire_quit_release -log DEBUG Bug: 136264323 Change-Id: I42dcf997fc44cde05695a563aa19c8e47f6f9f26
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions