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

Commit f346540e authored by Svet Ganov's avatar Svet Ganov Committed by The Android Automerger
Browse files

Fix NPE in AppOpsService

bug:22802981

Change-Id: I73eee5ff9cf1603d8f30355554ef075aa14afd30
parent 52d1a6b5
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1718,11 +1718,15 @@ public class AppOpsService extends IAppOpsService.Stub {
    }

    private static String[] getPackagesForUid(int uid) {
        String[] packageNames = null;
        try {
            return AppGlobals.getPackageManager().getPackagesForUid(uid);
            packageNames= AppGlobals.getPackageManager().getPackagesForUid(uid);
        } catch (RemoteException e) {
            /* ignore - local call */
        }
        if (packageNames == null) {
            return EmptyArray.STRING;
        }
        return packageNames;
    }
}