summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Piyush Mehrotra <piee@google.com> 2022-07-27 14:05:04 +0000
committer Piyush Mehrotra <piee@google.com> 2022-08-10 16:10:12 +0000
commitf75f7d99ea8bdf13d6f1db656239ccf85e5a4e3f (patch)
tree982298d424e24a121850afb11beb9cecef60ea37 /libs/androidfw/StringPool.cpp
parent9eb572bd5bf1d1f97ac98255eaa225f63e071e91 (diff)
Unregister transport when user disables corresponding package.
Register transport when user puts package in default enable state. This change is an extension of ag/17072365. TransportManager#onPackageChanged is not correctly handling these 2 cases - 1. When a package is disabled by user. Meaning, the state 'COMPONENT_ENABLED_STATE_DISABLED_USER' was being ignored. 2. When a package is default-enabled. Meaning, the state 'COMPONENT_ENABLED_STATE_DEFAULT' was being ignored. If the package in question contains backup transports, they should be registered or unregistered depending on the state. For state 'COMPONENT_ENABLED_STATE_DEFAULT', I'm considering it as if package is enabled. The only situation where package is in disabled state in default state is when it is explicitly specified in Manifest at an application level. Bug: 162725876, 237049952 Fixes: 162725876, 237049952 Test: 1. atest -v BackupFrameworksServicesRoboTests:TransportManagerTest 2. Manual test on device (Oriole) - List transports - Disable package via Settings -> Apps - List transports and verify disabled transports are not present. - Enable package via Settings -> Apps - List transports and verify default-enabled transports are present. - Verify logs via logcat to ensure correct switch codepaths was taken in TransportManager Change-Id: I1d5e9f8bf5625257bd01a910d29b4dbcb68f3ab4
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions