Skip to content
Commit 240daf67 authored by nathch's avatar nathch
Browse files

Unsubscribe listeners when stopping UserBackupManagerService

Unsubscribe listeners as otherwise they schedule work on a stopped handler thread
after the user backup manager service is stopped

This also ensures that any dangling wakelocks are released when they are
garbage collected

This was already done in master in ag/8036218

Test: atest CtsBackupTestCases CtsBackupHostTestCases
Test: m RunBackupFrameworksServicesRoboTests && atest RunBackupFrameworksServicesRoboTests

Test: blaze run -- //experimental/users/nathch/py/bug_repros:repro 136264323 -m w_codechange
followed by "adb shell kill -10 pid" (where pid = "adb shell pgrep system_server") to force GC
see in logs: PowerManager: WakeLock finalized while still held: *backup*-0

Test: blaze run -- //experimental/users/nathch/py/bug_repros:repro 136264323 -m backup_w_codechange
followed by same as above

Bug: 136264323
Bug: 135261178
Change-Id: I769d750a46faa3d28634d302e0f8e18cce41a744
parent 6de7a3a3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment