Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c7112149 authored by Jackal Guo's avatar Jackal Guo
Browse files

Fix cross user app visibility gap for setPackagesSuspended

Since DO/POs are privileged components, the implementation in DPM
would invoke PM#setPackageSudpended with #clearCallingIdentity.
However, the check in #getPackageStateForInstalledAndFiltered by-
passes system, shell, and root UID. This makes the check invalid,
and results in cross user app visibility gap. Apply the install
state check manually to mitigate this.

Bug: 229684723
Bug: 239945013
Test: CtsSuspendAppsTestCases
Test: CtsAppEnumerationTestCases:CrossUserPackageVisibilityTests
Test: CtsDevicePolicyManagerTestCases:MixedDeviceOwnerTest
        #testSuspendPackageWithPackageManager
Test: manually using the PoC in the buganizer to ensure the symptom
      no longer exists.
Change-Id: I04775ee1a5870fd7b1284c49cc5739bf88fbcfd4
parent 9bfd66eb
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