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

Commit f3807aa5 authored by Svet Ganov's avatar Svet Ganov
Browse files

Fix NPE in AppOpsService

bug:22802981

Change-Id: I73eee5ff9cf1603d8f30355554ef075aa14afd30
parent 8dbd4848
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;
    }
}