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

Commit 7ccf51dd authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Change clearDeviceOwnerApp to take a package"

parents 58f90ab1 94d2cf97
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5220,7 +5220,7 @@ package android.app.admin {
    method public void addPersistentPreferredActivity(android.content.ComponentName, android.content.IntentFilter, android.content.ComponentName);
    method public void addUserRestriction(android.content.ComponentName, java.lang.String);
    method public void clearCrossProfileIntentFilters(android.content.ComponentName);
    method public void clearDeviceOwnerApp();
    method public void clearDeviceOwnerApp(java.lang.String);
    method public void clearPackagePersistentPreferredActivities(android.content.ComponentName, java.lang.String);
    method public void clearUserRestriction(android.content.ComponentName, java.lang.String);
    method public android.os.UserHandle createAndInitializeUser(android.content.ComponentName, java.lang.String, java.lang.String, android.content.ComponentName, android.os.Bundle);
+4 −2
Original line number Diff line number Diff line
@@ -1840,11 +1840,13 @@ public class DevicePolicyManager {
     * This function should be used cautiously as once it is called it cannot
     * be undone.  The device owner can only be set as a part of device setup
     * before setup completes.
     *
     * @param packageName The package name of the device owner.
     */
    public void clearDeviceOwnerApp() {
    public void clearDeviceOwnerApp(String packageName) {
        if (mService != null) {
            try {
                mService.clearDeviceOwner(mContext.getPackageName());
                mService.clearDeviceOwner(packageName);
            } catch (RemoteException re) {
                Log.w(TAG, "Failed to clear device owner");
            }