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

Commit 5d7e9516 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "More APIs for encryption-aware apps."

parents da3dc74f e17ac156
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -9062,6 +9062,7 @@ package android.content.pm {
    field public android.content.pm.ApplicationInfo applicationInfo;
    field public int descriptionRes;
    field public boolean enabled;
    field public boolean encryptionAware;
    field public boolean exported;
    field public java.lang.String processName;
  }
@@ -9483,6 +9484,7 @@ package android.content.pm {
    field public static final int GET_CONFIGURATIONS = 16384; // 0x4000
    field public static final int GET_DISABLED_COMPONENTS = 512; // 0x200
    field public static final int GET_DISABLED_UNTIL_USED_COMPONENTS = 32768; // 0x8000
    field public static final int GET_ENCRYPTION_UNAWARE_COMPONENTS = 262144; // 0x40000
    field public static final int GET_GIDS = 256; // 0x100
    field public static final int GET_INSTRUMENTATION = 16; // 0x10
    field public static final int GET_INTENT_FILTERS = 32; // 0x20
+2 −0
Original line number Diff line number Diff line
@@ -9322,6 +9322,7 @@ package android.content.pm {
    field public android.content.pm.ApplicationInfo applicationInfo;
    field public int descriptionRes;
    field public boolean enabled;
    field public boolean encryptionAware;
    field public boolean exported;
    field public java.lang.String processName;
  }
@@ -9780,6 +9781,7 @@ package android.content.pm {
    field public static final int GET_CONFIGURATIONS = 16384; // 0x4000
    field public static final int GET_DISABLED_COMPONENTS = 512; // 0x200
    field public static final int GET_DISABLED_UNTIL_USED_COMPONENTS = 32768; // 0x8000
    field public static final int GET_ENCRYPTION_UNAWARE_COMPONENTS = 262144; // 0x40000
    field public static final int GET_GIDS = 256; // 0x100
    field public static final int GET_INSTRUMENTATION = 16; // 0x10
    field public static final int GET_INTENT_FILTERS = 32; // 0x20
+6 −1
Original line number Diff line number Diff line
@@ -2952,6 +2952,11 @@ public class ActivityManager {
        }
    }

    /** {@hide} */
    public static final int FLAG_OR_STOPPED = 1 << 0;
    /** {@hide} */
    public static final int FLAG_WITH_AMNESIA = 1 << 1;

    /**
     * Return whether the given user is actively running.  This means that
     * the user is in the "started" state, not "stopped" -- it is currently
@@ -2963,7 +2968,7 @@ public class ActivityManager {
     */
    public boolean isUserRunning(int userid) {
        try {
            return ActivityManagerNative.getDefault().isUserRunning(userid, false);
            return ActivityManagerNative.getDefault().isUserRunning(userid, 0);
        } catch (RemoteException e) {
            return false;
        }
+4 −4
Original line number Diff line number Diff line
@@ -1984,8 +1984,8 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
        case IS_USER_RUNNING_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            int userid = data.readInt();
            boolean orStopping = data.readInt() != 0;
            boolean result = isUserRunning(userid, orStopping);
            int _flags = data.readInt();
            boolean result = isUserRunning(userid, _flags);
            reply.writeNoException();
            reply.writeInt(result ? 1 : 0);
            return true;
@@ -5265,12 +5265,12 @@ class ActivityManagerProxy implements IActivityManager
        return userInfo;
    }

    public boolean isUserRunning(int userid, boolean orStopping) throws RemoteException {
    public boolean isUserRunning(int userid, int flags) throws RemoteException {
        Parcel data = Parcel.obtain();
        Parcel reply = Parcel.obtain();
        data.writeInterfaceToken(IActivityManager.descriptor);
        data.writeInt(userid);
        data.writeInt(orStopping ? 1 : 0);
        data.writeInt(flags);
        mRemote.transact(IS_USER_RUNNING_TRANSACTION, data, reply, 0);
        reply.readException();
        boolean result = reply.readInt() != 0;
+1 −1
Original line number Diff line number Diff line
@@ -392,7 +392,7 @@ public interface IActivityManager extends IInterface {
    public boolean startUserInBackground(int userid) throws RemoteException;
    public int stopUser(int userid, IStopUserCallback callback) throws RemoteException;
    public UserInfo getCurrentUser() throws RemoteException;
    public boolean isUserRunning(int userid, boolean orStopping) throws RemoteException;
    public boolean isUserRunning(int userid, int flags) throws RemoteException;
    public int[] getRunningUserIds() throws RemoteException;

    public boolean removeTask(int taskId) throws RemoteException;
Loading