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

Commit cacdaa4a authored by Jessica Wagantall's avatar Jessica Wagantall
Browse files

Merge tag 'android-6.0.1_r61' into HEAD

Android 6.0.1 Release 61 (MOB30Z)

Change-Id: Ib003ccb606e0d77209291b757ea36399d3b65814
parents 1ab48a36 4e4743a3
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
@@ -262,6 +262,10 @@ public final class Pm {
            return runMovePrimaryStorage();
        }

        if ("set-user-restriction".equals(op)) {
            return runSetUserRestriction();
        }

        try {
            if (args.length == 1) {
                if (args[0].equalsIgnoreCase("-l")) {
@@ -1518,6 +1522,38 @@ public final class Pm {
        }
    }

    public int runSetUserRestriction() {
        int userId = UserHandle.USER_OWNER;
        String opt = nextOption();
        if (opt != null && "--user".equals(opt)) {
            String arg = nextArg();
            if (arg == null || !isNumber(arg)) {
                System.err.println("Error: valid userId not specified");
                return 1;
            }
            userId = Integer.parseInt(arg);
        }

        String restriction = nextArg();
        String arg = nextArg();
        boolean value;
        if ("1".equals(arg)) {
            value = true;
        } else if ("0".equals(arg)) {
            value = false;
        } else {
            System.err.println("Error: valid value not specified");
            return 1;
        }
        try {
            mUm.setUserRestriction(restriction, value, userId);
            return 0;
        } catch (RemoteException e) {
            System.err.println(e.toString());
            return 1;
        }
    }

    private int runUninstall() throws RemoteException {
        int flags = 0;
        int userId = UserHandle.USER_ALL;
+6 −4
Original line number Diff line number Diff line
@@ -1600,9 +1600,10 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM

        case START_BACKUP_AGENT_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            ApplicationInfo info = ApplicationInfo.CREATOR.createFromParcel(data);
            String packageName = data.readString();
            int backupRestoreMode = data.readInt();
            boolean success = bindBackupAgent(info, backupRestoreMode);
            int userId = data.readInt();
            boolean success = bindBackupAgent(packageName, backupRestoreMode, userId);
            reply.writeNoException();
            reply.writeInt(success ? 1 : 0);
            return true;
@@ -3874,13 +3875,14 @@ class ActivityManagerProxy implements IActivityManager
        return binder;
    }

    public boolean bindBackupAgent(ApplicationInfo app, int backupRestoreMode)
    public boolean bindBackupAgent(String packageName, int backupRestoreMode, int userId)
            throws RemoteException {
        Parcel data = Parcel.obtain();
        Parcel reply = Parcel.obtain();
        data.writeInterfaceToken(IActivityManager.descriptor);
        app.writeToParcel(data, 0);
        data.writeString(packageName);
        data.writeInt(backupRestoreMode);
        data.writeInt(userId);
        mRemote.transact(START_BACKUP_AGENT_TRANSACTION, data, reply, 0);
        reply.readException();
        boolean success = reply.readInt() != 0;
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ public interface IActivityManager extends IInterface {
    public IBinder peekService(Intent service, String resolvedType, String callingPackage)
            throws RemoteException;

    public boolean bindBackupAgent(ApplicationInfo appInfo, int backupRestoreMode)
    public boolean bindBackupAgent(String packageName, int backupRestoreMode, int userId)
            throws RemoteException;
    public void clearPendingBackup() throws RemoteException;
    public void backupAgentCreated(String packageName, IBinder agent) throws RemoteException;
+10 −1
Original line number Diff line number Diff line
@@ -883,6 +883,15 @@ public class IntentFilter implements Parcelable {
            return true;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj instanceof AuthorityEntry) {
                final AuthorityEntry other = (AuthorityEntry)obj;
                return match(other);
            }
            return false;
        }

        /**
         * Determine whether this AuthorityEntry matches the given data Uri.
         * <em>Note that this comparison is case-sensitive, unlike formal
@@ -917,7 +926,7 @@ public class IntentFilter implements Parcelable {
            }
            return MATCH_CATEGORY_HOST;
        }
    };
    }

    /**
     * Add a new Intent data "scheme specific part" to match against.  The filter must
+8 −0
Original line number Diff line number Diff line
@@ -1415,6 +1415,14 @@
    <permission android:name="android.permission.MANAGE_USERS"
        android:protectionLevel="signature|privileged" />

    <!-- @hide Allows an application to create, remove users and get the list of
         users on the device. Applications holding this permission can only create restricted,
         guest, and managed users. For creating other kind of users,
         {@link android.Manifest.permission#MANAGE_USERS} is needed.
         This permission is not available to third party applications. -->
    <permission android:name="android.permission.CREATE_USERS"
        android:protectionLevel="signature" />

    <!-- @hide Allows an application to set the profile owners and the device owner.
         This permission is not available to third party applications.-->
    <permission android:name="android.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS"
Loading