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

Commit 5981b8c2 authored by Andrii Kulian's avatar Andrii Kulian Committed by Android (Google) Code Review
Browse files

Merge "Remember task which is being locked" into nyc-dev

parents ff71d20f 0f051f5a
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -2578,9 +2578,10 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
            return true;
        }

        case START_LOCK_TASK_BY_CURRENT_TRANSACTION: {
        case START_SYSTEM_LOCK_TASK_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            startLockTaskModeOnCurrent();
            int taskId = data.readInt();
            startSystemLockTaskMode(taskId);
            reply.writeNoException();
            return true;
        }
@@ -2592,9 +2593,9 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
            return true;
        }

        case STOP_LOCK_TASK_BY_CURRENT_TRANSACTION: {
        case STOP_SYSTEM_LOCK_TASK_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            stopLockTaskModeOnCurrent();
            stopSystemLockTaskMode();
            reply.writeNoException();
            return true;
        }
@@ -6386,11 +6387,12 @@ class ActivityManagerProxy implements IActivityManager
    }

    @Override
    public void startLockTaskModeOnCurrent() throws RemoteException {
    public void startSystemLockTaskMode(int taskId) throws RemoteException {
        Parcel data = Parcel.obtain();
        Parcel reply = Parcel.obtain();
        data.writeInterfaceToken(IActivityManager.descriptor);
        mRemote.transact(START_LOCK_TASK_BY_CURRENT_TRANSACTION, data, reply, 0);
        data.writeInt(taskId);
        mRemote.transact(START_SYSTEM_LOCK_TASK_TRANSACTION, data, reply, 0);
        reply.readException();
        data.recycle();
        reply.recycle();
@@ -6408,11 +6410,11 @@ class ActivityManagerProxy implements IActivityManager
    }

    @Override
    public void stopLockTaskModeOnCurrent() throws RemoteException {
    public void stopSystemLockTaskMode() throws RemoteException {
        Parcel data = Parcel.obtain();
        Parcel reply = Parcel.obtain();
        data.writeInterfaceToken(IActivityManager.descriptor);
        mRemote.transact(STOP_LOCK_TASK_BY_CURRENT_TRANSACTION, data, reply, 0);
        mRemote.transact(STOP_SYSTEM_LOCK_TASK_TRANSACTION, data, reply, 0);
        reply.readException();
        data.recycle();
        reply.recycle();
+4 −4
Original line number Diff line number Diff line
@@ -555,7 +555,7 @@ public interface IActivityManager extends IInterface {

    public int getActivityDisplayId(IBinder activityToken) throws RemoteException;

    public void startLockTaskModeOnCurrent() throws RemoteException;
    public void startSystemLockTaskMode(int taskId) throws RemoteException;

    public void startLockTaskMode(int taskId) throws RemoteException;

@@ -563,7 +563,7 @@ public interface IActivityManager extends IInterface {

    public void stopLockTaskMode() throws RemoteException;

    public void stopLockTaskModeOnCurrent() throws RemoteException;
    public void stopSystemLockTaskMode() throws RemoteException;

    public boolean isInLockTaskMode() throws RemoteException;

@@ -949,8 +949,8 @@ public interface IActivityManager extends IInterface {
    int START_VOICE_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+218;
    int GET_ACTIVITY_OPTIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+219;
    int GET_APP_TASKS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+220;
    int START_LOCK_TASK_BY_CURRENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+221;
    int STOP_LOCK_TASK_BY_CURRENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+222;
    int START_SYSTEM_LOCK_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+221;
    int STOP_SYSTEM_LOCK_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+222;
    int FINISH_VOICE_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+223;
    int IS_TOP_OF_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+224;
    int REQUEST_VISIBLE_BEHIND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+225;
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ oneway interface IStatusBar
    void toggleSplitScreen();
    void preloadRecentApps();
    void cancelPreloadRecentApps();
    void showScreenPinningRequest();
    void showScreenPinningRequest(int taskId);

    void toggleKeyboardShortcutsMenu(int deviceId);

+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ oneway interface IRecentsSystemUserCallbacks {
    void registerNonSystemUserCallbacks(IBinder nonSystemUserCallbacks, int userId);

    void updateRecentsVisibility(boolean visible);
    void startScreenPinning();
    void startScreenPinning(int taskId);
    void sendRecentsDrawnEvent();
    void sendDockingTopTaskEvent(int dragMode, in Rect initialRect);
    void sendLaunchRecentsEvent();
+2 −2
Original line number Diff line number Diff line
@@ -598,13 +598,13 @@ public class Recents extends SystemUI
    public final void onBusEvent(final ScreenPinningRequestEvent event) {
        int processUser = sSystemServicesProxy.getProcessUser();
        if (sSystemServicesProxy.isSystemUser(processUser)) {
            mImpl.onStartScreenPinning(event.applicationContext);
            mImpl.onStartScreenPinning(event.applicationContext, event.taskId);
        } else {
            postToSystemUser(new Runnable() {
                @Override
                public void run() {
                    try {
                        mUserToSystemCallbacks.startScreenPinning();
                        mUserToSystemCallbacks.startScreenPinning(event.taskId);
                    } catch (RemoteException e) {
                        Log.e(TAG, "Callback failed", e);
                    }
Loading