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

Commit 6918dbc8 authored by Victor Chang's avatar Victor Chang Committed by android-build-merger
Browse files

Merge "Api change of DPM.setApplicationRestrictionsManagingPackage()" into nyc-dev

am: d3c0cf50

* commit 'd3c0cf50':
  Api change of DPM.setApplicationRestrictionsManagingPackage()
parents a7120b0d d3c0cf50
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5913,7 +5913,7 @@ package android.app.admin {
    method public boolean setAlwaysOnVpnPackage(android.content.ComponentName, java.lang.String);
    method public boolean setApplicationHidden(android.content.ComponentName, java.lang.String, boolean);
    method public void setApplicationRestrictions(android.content.ComponentName, java.lang.String, android.os.Bundle);
    method public void setApplicationRestrictionsManagingPackage(android.content.ComponentName, java.lang.String);
    method public void setApplicationRestrictionsManagingPackage(android.content.ComponentName, java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public void setAutoTimeRequired(android.content.ComponentName, boolean);
    method public void setBluetoothContactSharingDisabled(android.content.ComponentName, boolean);
    method public void setCameraDisabled(android.content.ComponentName, boolean);
+1 −1
Original line number Diff line number Diff line
@@ -6061,7 +6061,7 @@ package android.app.admin {
    method public boolean setAlwaysOnVpnPackage(android.content.ComponentName, java.lang.String);
    method public boolean setApplicationHidden(android.content.ComponentName, java.lang.String, boolean);
    method public void setApplicationRestrictions(android.content.ComponentName, java.lang.String, android.os.Bundle);
    method public void setApplicationRestrictionsManagingPackage(android.content.ComponentName, java.lang.String);
    method public void setApplicationRestrictionsManagingPackage(android.content.ComponentName, java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public void setAutoTimeRequired(android.content.ComponentName, boolean);
    method public void setBluetoothContactSharingDisabled(android.content.ComponentName, boolean);
    method public void setCameraDisabled(android.content.ComponentName, boolean);
+1 −1
Original line number Diff line number Diff line
@@ -5917,7 +5917,7 @@ package android.app.admin {
    method public boolean setAlwaysOnVpnPackage(android.content.ComponentName, java.lang.String);
    method public boolean setApplicationHidden(android.content.ComponentName, java.lang.String, boolean);
    method public void setApplicationRestrictions(android.content.ComponentName, java.lang.String, android.os.Bundle);
    method public void setApplicationRestrictionsManagingPackage(android.content.ComponentName, java.lang.String);
    method public void setApplicationRestrictionsManagingPackage(android.content.ComponentName, java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
    method public void setAutoTimeRequired(android.content.ComponentName, boolean);
    method public void setBluetoothContactSharingDisabled(android.content.ComponentName, boolean);
    method public void setCameraDisabled(android.content.ComponentName, boolean);
+7 −3
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ParceledListSlice;
import android.content.pm.UserInfo;
import android.graphics.Bitmap;
@@ -3980,18 +3981,21 @@ public class DevicePolicyManager {
     * {@code null} value or uninstalling the managing package.
     * <p>
     * The supplied application restriction managing package must be installed when calling this
     * API, otherwise an {@link IllegalArgumentException} will be thrown.
     * API, otherwise an {@link NameNotFoundException} will be thrown.
     *
     * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
     * @param packageName The package name which will be given access to application restrictions
     *            APIs. If {@code null} is given the current package will be cleared.
     * @throws SecurityException if {@code admin} is not a device or profile owner.
     * @throws NameNotFoundException if {@code packageName} is not found
     */
    public void setApplicationRestrictionsManagingPackage(@NonNull ComponentName admin,
            @Nullable String packageName) {
            @Nullable String packageName) throws NameNotFoundException {
        if (mService != null) {
            try {
                mService.setApplicationRestrictionsManagingPackage(admin, packageName);
                if (!mService.setApplicationRestrictionsManagingPackage(admin, packageName)) {
                    throw new NameNotFoundException(packageName);
                }
            } catch (RemoteException e) {
                throw e.rethrowFromSystemServer();
            }
+1 −1
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ interface IDevicePolicyManager {

    void setApplicationRestrictions(in ComponentName who, in String packageName, in Bundle settings);
    Bundle getApplicationRestrictions(in ComponentName who, in String packageName);
    void setApplicationRestrictionsManagingPackage(in ComponentName admin, in String packageName);
    boolean setApplicationRestrictionsManagingPackage(in ComponentName admin, in String packageName);
    String getApplicationRestrictionsManagingPackage(in ComponentName admin);
    boolean isCallerApplicationRestrictionsManagingPackage();

Loading