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

Commit a371084e authored by Ian Pedowitz's avatar Ian Pedowitz
Browse files

resolved conflicts for merge of d4b8064e to master

Change-Id: I3d41b5bd0ecdd97f8e563b061fc8648d2206bc31
parents 753b65ea d4b8064e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3360,6 +3360,7 @@ package android.app {
    method public boolean isImmersive();
    method public boolean isTaskRoot();
    method public boolean isVoiceInteraction();
    method public boolean isVoiceInteractionRoot();
    method public final deprecated android.database.Cursor managedQuery(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
    method public boolean moveTaskToBack(boolean);
    method public boolean navigateUpTo(android.content.Intent);
+1 −0
Original line number Diff line number Diff line
@@ -3463,6 +3463,7 @@ package android.app {
    method public boolean isImmersive();
    method public boolean isTaskRoot();
    method public boolean isVoiceInteraction();
    method public boolean isVoiceInteractionRoot();
    method public final deprecated android.database.Cursor managedQuery(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
    method public boolean moveTaskToBack(boolean);
    method public boolean navigateUpTo(android.content.Intent);
+16 −0
Original line number Diff line number Diff line
@@ -1229,6 +1229,22 @@ public class Activity extends ContextThemeWrapper
        return mVoiceInteractor != null;
    }

    /**
     * Like {@link #isVoiceInteraction}, but only returns true if this is also the root
     * of a voice interaction.  That is, returns true if this activity was directly
     * started by the voice interaction service as the initiation of a voice interaction.
     * Otherwise, for example if it was started by another activity while under voice
     * interaction, returns false.
     */
    public boolean isVoiceInteractionRoot() {
        try {
            return mVoiceInteractor != null
                    && ActivityManagerNative.getDefault().isRootVoiceInteraction(mToken);
        } catch (RemoteException e) {
        }
        return false;
    }

    /**
     * Retrieve the active {@link VoiceInteractor} that the user is going through to
     * interact with this activity.
+23 −0
Original line number Diff line number Diff line
@@ -2610,6 +2610,15 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
            return true;
        }

        case IS_ROOT_VOICE_INTERACTION_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            IBinder token = data.readStrongBinder();
            boolean res = isRootVoiceInteraction(token);
            reply.writeNoException();
            reply.writeInt(res ? 1 : 0);
            return true;
        }

        case START_BINDER_TRACKING_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            boolean res = startBinderTracking();
@@ -6078,5 +6087,19 @@ class ActivityManagerProxy implements IActivityManager
        return res != 0;
    }

    @Override
    public boolean isRootVoiceInteraction(IBinder token) throws RemoteException {
        Parcel data = Parcel.obtain();
        Parcel reply = Parcel.obtain();
        data.writeInterfaceToken(IActivityManager.descriptor);
        data.writeStrongBinder(token);
        mRemote.transact(IS_ROOT_VOICE_INTERACTION_TRANSACTION, data, reply, 0);
        reply.readException();
        int res = reply.readInt();
        data.recycle();
        reply.recycle();
        return res != 0;
    }

    private IBinder mRemote;
}
+3 −0
Original line number Diff line number Diff line
@@ -518,6 +518,8 @@ public interface IActivityManager extends IInterface {
    public boolean setProcessMemoryTrimLevel(String process, int uid, int level)
            throws RemoteException;

    public boolean isRootVoiceInteraction(IBinder token) throws RemoteException;

    // Start Binder transaction tracking for all applications.
    public boolean startBinderTracking() throws RemoteException;

@@ -871,6 +873,7 @@ public interface IActivityManager extends IInterface {
    int IS_SCREEN_CAPTURE_ALLOWED_ON_CURRENT_ACTIVITY_TRANSACTION
            = IBinder.FIRST_CALL_TRANSACTION+299;
    int SHOW_ASSIST_FROM_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+300;
    int IS_ROOT_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+301;

    // Start of N transactions
    int START_BINDER_TRACKING_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 340;
Loading