summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorCharles He <qiurui@google.com>2017-10-31 09:35:15 +0000
committerCharles He <qiurui@google.com>2017-11-01 09:43:14 +0000
commitcdef147ac370d5bd6206c632c47570a9e024ad8a (patch)
treee4e3c2bb9d683fc2a274f310e1618acc34dab91b /tools/aapt2/java/JavaClassGenerator.cpp
parent01c9c0e4ba3912907030a53123d6a37325cfb646 (diff)
TokenWatcher: fix bug in repeated calls to acquire().
The javadoc of TokenWatcher promised to implement repeated calls to acquire() with the same token as a no-op, but this wasn't the case. When acquire() is called repeatedly with the same token, its associated DeathRecipient object is replaced by a new one. The old DeathRecipient can therefore be destroyed. This is problematic because the finalizer of this DeathRecipient implementation calls release() on the same token, resulting in the token being released unexpectedly. In this CL we properly implement the documented no-op behavior. Bug: 68368071 Test: (First, cherry-pick to internal master) Test: cts-tradefed run cts-dev -m OsTest -t android.os.cts.TokenWatcherTest Test: CTS verifier > Managed provisioning > Device owner tests > LockTask UI Change-Id: Idfad7c88075a510ea1f8527b5a8620121a5dd7bb
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions