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

Commit 87920455 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE in AppOpsService" into mnc-dev

parents 0855357c f3807aa5
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;
    }
}