summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Evan Severson <evanseverson@google.com> 2025-02-27 10:28:18 -0800
committer Evan Severson <evanseverson@google.com> 2025-03-18 21:41:19 -0700
commitf506c3679589bee7babb5af9cd0106ad76653c71 (patch)
tree8aca453b698a48ded0cd3349318dfb30c86b5757 /libs/androidfw/StringPool.cpp
parent34f9f07edf00f62d54803c60a5c30af678e33195 (diff)
Invoke uid state change callback for all nonexistent apps
Uids transitioning from UID_STATE_CACHED to UID_STATE_NONEXISTENT don't currently invoke the callback since NONEXISTENT is equivalent to CACHED externally to AppOpsService. This lead to an issue where an app getting killed from the CACHED state doesn't invoke the cleanup routine for running ops. In this change we treat NONEXISTENT as a separate state inside of AppOpsUidStateTracker so that we can track killed uids the same way as other transistions and then external to the tracker translate back to CACHED and invoke that callback if transistioning from something other than CACHED. Then finally the NONEXISTENT callback will always be invoked so that AppOpsService can run its cleanup routine. Mocking tests are updated to be more rigorous to expect exact amounts of invocations. Test: atest CtsMediaAudioPermissionTestCases CtsAppOpsTestCases \ AppOpsUidStateTrackerTest Flag: android.permission.flags.finish_running_ops_for_killed_packages Bug: 399667889 Change-Id: I515173921cd4df88c35e2a4847122b5ab56cb937
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions