summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author TYM Tsai <tymtsai@google.com> 2024-05-28 00:44:25 +0800
committer TYM Tsai <tymtsai@google.com> 2024-05-28 00:44:25 +0800
commitf0f0e132fcbde0cea24fe25401842366eea75853 (patch)
tree8288c661e1914e378e6d22caf4476fef5fc2ef31 /libs/androidfw/StringPool.cpp
parentd24f7b2d8eda762c5a5c4e242bc6fbd76ec75d65 (diff)
Fix test failure not hold Object of PackageMonitor
PackageMonitorCallback holds a weak reference to PackageMonitor. If no other holder, the PackageMonitor object will be recycled. Currently, the object in SearchManagerService is held by a registered broadcast receiver. But in PackageMonitor, registering a receiver is not a must. PackageMonitor refactor the structure to only register receivers if the client is interested in a package restart query. Otherwise, they will not register any receiver. That will cause the object of PackageMonitor to have no any holder. After the object is recycled, there will not be any package events that are received and cause tests to fail. Bug: 340410698 Test: atest CtsAppTestCases:android.app.cts.SearchManagerTest Change-Id: I2005e257ed34523a2896bec3299a52700afab4d5
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions