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

Commit 2b2e994b authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Expose stopAppForUser in ActivityManger" into main

parents 62b05a04 425fa132
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -4974,6 +4974,25 @@ public class ActivityManager {
        }
    }

    /**
     * Fully stop the given app's processes without restoring service starts or
     * bindings, but without the other durable effects of the full-scale
     * "force stop" intervention.
     *
     * @param packageName The name of the package to be stopped.
     *
     * @hide This is not available to third party applications due to
     * it allowing them to break other applications by stopping their
     * services.
     */
    public void stopPackageForUser(String packageName) {
        try {
            getService().stopAppForUser(packageName, mContext.getUserId());
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Sets the current locales of the device. Calling app must have the permission
     * {@code android.permission.CHANGE_CONFIGURATION} and