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

Commit 46199af0 authored by Manjeet Rulhania's avatar Manjeet Rulhania
Browse files

Fix NPE booting with new permissions subsystem

This was fixed in ag/21724772 but that cl got reverted
due to some unit test failures, pushing this change to resolve NPE
until unit test failures are resolved and ag/21724772 is merged.

Bug: 266163862
Change-Id: Idaffc9cd15a7e2b7b8afac361e62ce05ec467605
Test: build
parent 4280e22a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -86,6 +86,10 @@ public class PermissionMigrationHelperImpl implements PermissionMigrationHelper
        Map<Integer, Map<String, LegacyPermissionState>> appIdPermissionStates = new ArrayMap<>();

        RuntimePermissionsState legacyState = legacyPersistence.readForUser(UserHandle.of(userId));
        if (legacyState == null) {
            return appIdPermissionStates;
        }

        PackageManagerLocal packageManagerLocal =
                LocalManagerRegistry.getManager(PackageManagerLocal.class);