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

Commit 86f07870 authored by Todd Kennedy's avatar Todd Kennedy
Browse files

Avoid potential NPE

Bug: 185421861
Test: Manual
Change-Id: I66532a25be7eba30c41d9b87ffacf757e48e5c89
parent e1bfbd68
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -26011,7 +26011,11 @@ public class PackageManagerService extends IPackageManager.Stub
        @Override
        @Override
        public String[] getNamesForUids(int[] uids) throws RemoteException {
        public String[] getNamesForUids(int[] uids) throws RemoteException {
            final String[] results = PackageManagerService.this.getNamesForUids(uids);
            if (uids == null || uids.length == 0) {
                return null;
            }
            final String[] names = PackageManagerService.this.getNamesForUids(uids);
            final String[] results = (names != null) ? names : new String[uids.length];
            // massage results so they can be parsed by the native binder
            // massage results so they can be parsed by the native binder
            for (int i = results.length - 1; i >= 0; --i) {
            for (int i = results.length - 1; i >= 0; --i) {
                if (results[i] == null) {
                if (results[i] == null) {