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

Skip to content
Commit 12e2998c authored by Rubin Xu's avatar Rubin Xu
Browse files

Migrate setPackagesSuspended

The underlying package suspension mechanism (PackageManager
.setPackagesSuspendedByAdmin) changes package suspension
state on a per-package basis so we can't simply "push" the
current list of suspended package to PackageManager from
PolicyEnforcerCallback. DPM.setPackagesSuspended() also
returns a list of failed packages which is complex to calculate
under coexistence. As a result, we simply use PolicyEngine
to store the package suspension state, and keep the enforcing
logic in DPMS.

Test: FrameworksServicesTests:SuspendPackagesTest
      android.suspendapps.cts.SuspendPackagesTest
      android.devicepolicy.cts.PackagesTest
      android.devicepolicy.cts.PackageSuspensionTest
      android.devicepolicy.cts.ApplicationExemptionsTest
      MixedDeviceOwnerTest#testSuspendPackage
      MixedManagedProfileOwnerTest#testSuspendPackage
      MixedDeviceOwnerTest#testSuspendPackageWithPackageManager
      MixedManagedProfileOwnerTest#testSuspendPackageWithPackageManager
Bug: 335624297
Change-Id: I9c287d39593d53d69e16ea2ec520df4d12ebcdaa
parent 101b2f5e
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