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

Commit 4f46813e authored by Alex Chau's avatar Alex Chau Committed by Android (Google) Code Review
Browse files

Merge "API Review: Put executor argument before the listener argument for clearApplicationUserData"

parents f24977b5 4a4285bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6367,7 +6367,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 boolean bindDeviceAdminServiceAsUser(android.content.ComponentName, android.content.Intent, android.content.ServiceConnection, int, android.os.UserHandle);
    method public boolean clearApplicationUserData(android.content.ComponentName, java.lang.String, android.app.admin.DevicePolicyManager.OnClearApplicationUserDataListener, java.util.concurrent.Executor);
    method public boolean clearApplicationUserData(android.content.ComponentName, java.lang.String, java.util.concurrent.Executor, android.app.admin.DevicePolicyManager.OnClearApplicationUserDataListener);
    method public void clearCrossProfileIntentFilters(android.content.ComponentName);
    method public deprecated void clearDeviceOwnerApp(java.lang.String);
    method public void clearPackagePersistentPreferredActivities(android.content.ComponentName, java.lang.String);
+3 −15
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package android.app.admin;

import android.annotation.CallbackExecutor;
import android.annotation.ColorInt;
import android.annotation.Condemned;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -50,8 +49,6 @@ import android.graphics.Bitmap;
import android.net.ProxyInfo;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerExecutor;
import android.os.Parcelable;
import android.os.PersistableBundle;
import android.os.Process;
@@ -8983,15 +8980,6 @@ public class DevicePolicyManager {
        }
    }

    /** {@hide} */
    @Condemned
    @Deprecated
    public boolean clearApplicationUserData(@NonNull ComponentName admin,
            @NonNull String packageName, @NonNull OnClearApplicationUserDataListener listener,
            @NonNull Handler handler) {
        return clearApplicationUserData(admin, packageName, listener, new HandlerExecutor(handler));
    }

    /**
     * Called by the device owner or profile owner to clear application user data of a given
     * package. The behaviour of this is equivalent to the target application calling
@@ -9002,14 +8990,14 @@ public class DevicePolicyManager {
     *
     * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
     * @param packageName The name of the package which will have its user data wiped.
     * @param listener A callback object that will inform the caller when the clearing is done.
     * @param executor The executor through which the listener should be invoked.
     * @param listener A callback object that will inform the caller when the clearing is done.
     * @throws SecurityException if the caller is not the device owner/profile owner.
     * @return whether the clearing succeeded.
     */
    public boolean clearApplicationUserData(@NonNull ComponentName admin,
            @NonNull String packageName, @NonNull OnClearApplicationUserDataListener listener,
            @NonNull @CallbackExecutor Executor executor) {
            @NonNull String packageName, @NonNull @CallbackExecutor Executor executor,
            @NonNull OnClearApplicationUserDataListener listener) {
        throwIfParentInstance("clearAppData");
        Preconditions.checkNotNull(executor);
        try {