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

Commit 3a8af078 authored by Todd Kennedy's avatar Todd Kennedy Committed by Automerger Merge Worker
Browse files

Merge "Add debugging to diagnose failure" into sc-dev am: d8fe801f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14414237

Change-Id: Ie2474763f2f09955c1cd6c8b8cca1d5759a630c1
parents 1536ddf6 d8fe801f
Loading
Loading
Loading
Loading
+21 −10
Original line number Diff line number Diff line
@@ -26033,11 +26033,14 @@ public class PackageManagerService extends IPackageManager.Stub
        @Override
        public String[] getNamesForUids(int[] uids) throws RemoteException {
            String[] names = null;
            String[] results = null;
            try {
                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];
                names = PackageManagerService.this.getNamesForUids(uids);
                results = (names != null) ? names : new String[uids.length];
                // massage results so they can be parsed by the native binder
                for (int i = results.length - 1; i >= 0; --i) {
                    if (results[i] == null) {
@@ -26045,6 +26048,14 @@ public class PackageManagerService extends IPackageManager.Stub
                    }
                }
                return results;
            } catch (Throwable t) {
                // STOPSHIP(186558987): revert addition of try/catch/log
                Slog.e(TAG, "uids: " + Arrays.toString(uids));
                Slog.e(TAG, "names: " + Arrays.toString(names));
                Slog.e(TAG, "results: " + Arrays.toString(results));
                Slog.e(TAG, "throwing exception", t);
                throw t;
            }
        }
        // NB: this differentiates between preloads and sideloads