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

Skip to content
Commit 5720f225 authored by Pavel Grafov's avatar Pavel Grafov
Browse files

Make PM unit tests work with trunk stable flags

Currently DeviceConfig is fully mocked out, so annotations like
@RequiresFlagsEnabled don't work. This CL makes DeviceConfig mock
fall back to the real instance.
One side effect of it is that a flag, SYSTEM_EXEMPT_FROM_SUSPENSION,
that defaulted to `true` is now also considered `true` in tests,
causing a failure, so I also cleaned up the flag and updated the
test code to provide AppOpsManager mock.

Bug: 309671525
Bug: 263464464
Test: atest com.android.server.pm.PackageManagerServiceBootTest \
      com.android.server.pm.PackageManagerServiceHibernationTests \
      com.android.server.pm.ApexManagerTest \
      com.android.server.pm.DeletePackageHelperTest \
      com.android.server.pm.PackageFreezerTest \
      com.android.server.pm.PackageArchiverTest \
      com.android.server.pm.PackageMonitorCallbackHelperTest \
      com.android.server.pm.InitAppsHelperTest \
      com.android.server.pm.SharedLibrariesImplTest \
      com.android.server.pm.SuspendPackageHelperTest \
      com.android.server.pm.DistractingPackageHelperTest
Change-Id: I17bdfc498d86c43faf257ef64b6b0d20069e5cc8
parent 933f3ee9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment