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

Commit 08f6ca39 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Prevent start if package is frozen" into rvc-dev

parents f5360ee0 72e1cacf
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -2334,6 +2334,19 @@ public final class ProcessList {
            if (sb == null) sb = new StringBuilder();
            sb.append("seq=" + app.startSeq + ",expected=" + expectedStartSeq + ";");
        }
        try {
            AppGlobals.getPackageManager().checkPackageStartable(app.info.packageName, app.userId);
        } catch (RemoteException e) {
            // unexpected; ignore
        } catch (SecurityException e) {
            if (mService.mConstants.FLAG_PROCESS_START_ASYNC) {
                if (sb == null) sb = new StringBuilder();
                sb.append("Package is frozen;");
            } else {
                // we're not being started async and so should throw to the caller.
                throw e;
            }
        }
        return sb == null ? null : sb.toString();
    }