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

Commit afde01a5 authored by Alex Buynytskyy's avatar Alex Buynytskyy Committed by Android (Google) Code Review
Browse files

Merge "Semi-silently ignore security exception." into main

parents d3faa43e b1b70b75
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1085,8 +1085,14 @@ class PackageManagerShellCommand extends ShellCommand {
        // the sdk or package name along with optional additional information based on opt.
        final Map<String, List<String>> out = new HashMap<>();
        for (int userId : userIds) {
            final int translatedUserId =
            final int translatedUserId;
            try {
                translatedUserId =
                    translateUserId(userId, UserHandle.USER_SYSTEM, "runListPackages");
            } catch (RuntimeException ex) {
                getErrPrintWriter().println("Error: " + ex.toString());
                continue;
            }
            @SuppressWarnings("unchecked") final ParceledListSlice<PackageInfo> slice =
                    mInterface.getInstalledPackages(getFlags, translatedUserId);
            final List<PackageInfo> packages = slice.getList();