am 4dbb0aab: am 581feb87: am 90ac517c: Create API for launching from recents
* commit '4dbb0aabb98986ed8105f85d6d46c6d4b2f78408': Create API for launching from recents
This commit is contained in:
@@ -284,6 +284,17 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
|
||||
return true;
|
||||
}
|
||||
|
||||
case START_ACTIVITY_FROM_RECENTS_TRANSACTION:
|
||||
{
|
||||
data.enforceInterface(IActivityManager.descriptor);
|
||||
int taskId = data.readInt();
|
||||
Bundle options = data.readInt() == 0 ? null : Bundle.CREATOR.createFromParcel(data);
|
||||
int result = startActivityFromRecents(taskId, options);
|
||||
reply.writeNoException();
|
||||
reply.writeInt(result);
|
||||
return true;
|
||||
}
|
||||
|
||||
case FINISH_ACTIVITY_TRANSACTION: {
|
||||
data.enforceInterface(IActivityManager.descriptor);
|
||||
IBinder token = data.readStrongBinder();
|
||||
@@ -2482,6 +2493,24 @@ class ActivityManagerProxy implements IActivityManager
|
||||
data.recycle();
|
||||
return result != 0;
|
||||
}
|
||||
public int startActivityFromRecents(int taskId, Bundle options) throws RemoteException {
|
||||
Parcel data = Parcel.obtain();
|
||||
Parcel reply = Parcel.obtain();
|
||||
data.writeInterfaceToken(IActivityManager.descriptor);
|
||||
data.writeInt(taskId);
|
||||
if (options == null) {
|
||||
data.writeInt(0);
|
||||
} else {
|
||||
data.writeInt(1);
|
||||
options.writeToParcel(data, 0);
|
||||
}
|
||||
mRemote.transact(START_ACTIVITY_FROM_RECENTS_TRANSACTION, data, reply, 0);
|
||||
reply.readException();
|
||||
int result = reply.readInt();
|
||||
reply.recycle();
|
||||
data.recycle();
|
||||
return result;
|
||||
}
|
||||
public boolean finishActivity(IBinder token, int resultCode, Intent resultData, boolean finishTask)
|
||||
throws RemoteException {
|
||||
Parcel data = Parcel.obtain();
|
||||
|
||||
@@ -86,6 +86,7 @@ public interface IActivityManager extends IInterface {
|
||||
ParcelFileDescriptor profileFd, Bundle options, int userId) throws RemoteException;
|
||||
public boolean startNextMatchingActivity(IBinder callingActivity,
|
||||
Intent intent, Bundle options) throws RemoteException;
|
||||
public int startActivityFromRecents(int taskId, Bundle options) throws RemoteException;
|
||||
public boolean finishActivity(IBinder token, int code, Intent data, boolean finishTask)
|
||||
throws RemoteException;
|
||||
public void finishSubActivity(IBinder token, String resultWho, int requestCode) throws RemoteException;
|
||||
@@ -756,4 +757,5 @@ public interface IActivityManager extends IInterface {
|
||||
int IS_BG_MEDIA_PLAYING_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+226;
|
||||
int MEDIA_RESOURCES_RELEASED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+227;
|
||||
int NOTIFY_LAUNCH_TASK_BEHIND_COMPLETE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+228;
|
||||
int START_ACTIVITY_FROM_RECENTS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 229;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user