diff options
Diffstat (limited to 'core/java/android/app/ApplicationThreadNative.java')
| -rw-r--r-- | core/java/android/app/ApplicationThreadNative.java | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java index f164a0a76d8f..bead625a0bc1 100644 --- a/core/java/android/app/ApplicationThreadNative.java +++ b/core/java/android/app/ApplicationThreadNative.java @@ -63,14 +63,14 @@ public abstract class ApplicationThreadNative extends Binder if (in != null) { return in; } - + return new ApplicationThreadProxy(obj); } - + public ApplicationThreadNative() { attachInterface(this, descriptor); } - + @Override public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { @@ -96,7 +96,7 @@ public abstract class ApplicationThreadNative extends Binder scheduleStopActivity(b, show, configChanges); return true; } - + case SCHEDULE_WINDOW_VISIBILITY_TRANSACTION: { data.enforceInterface(IApplicationThread.descriptor); @@ -125,7 +125,7 @@ public abstract class ApplicationThreadNative extends Binder scheduleResumeActivity(b, procState, isForward, resumeArgs); return true; } - + case SCHEDULE_SEND_RESULT_TRANSACTION: { data.enforceInterface(IApplicationThread.descriptor); @@ -179,7 +179,9 @@ public abstract class ApplicationThreadNative extends Binder if (data.readInt() != 0) { overrideConfig = Configuration.CREATOR.createFromParcel(data); } - scheduleRelaunchActivity(b, ri, pi, configChanges, notResumed, config, overrideConfig); + boolean preserveWindows = data.readInt() == 1; + scheduleRelaunchActivity(b, ri, pi, configChanges, notResumed, config, overrideConfig, + preserveWindows); return true; } @@ -201,7 +203,7 @@ public abstract class ApplicationThreadNative extends Binder scheduleDestroyActivity(b, finishing, configChanges); return true; } - + case SCHEDULE_RECEIVER_TRANSACTION: { data.enforceInterface(IApplicationThread.descriptor); @@ -371,7 +373,7 @@ public abstract class ApplicationThreadNative extends Binder } return true; } - + case DUMP_PROVIDER_TRANSACTION: { data.enforceInterface(IApplicationThread.descriptor); ParcelFileDescriptor fd = data.readFileDescriptor(); @@ -731,15 +733,15 @@ public abstract class ApplicationThreadNative extends Binder class ApplicationThreadProxy implements IApplicationThread { private final IBinder mRemote; - + public ApplicationThreadProxy(IBinder remote) { mRemote = remote; } - + public final IBinder asBinder() { return mRemote; } - + public final void schedulePauseActivity(IBinder token, boolean finished, boolean userLeaving, int configChanges, boolean dontReport) throws RemoteException { Parcel data = Parcel.obtain(); @@ -856,7 +858,7 @@ class ApplicationThreadProxy implements IApplicationThread { public final void scheduleRelaunchActivity(IBinder token, List<ResultInfo> pendingResults, List<ReferrerIntent> pendingNewIntents, int configChanges, boolean notResumed, Configuration config, - Configuration overrideConfig) throws RemoteException { + Configuration overrideConfig, boolean preserveWindow) throws RemoteException { Parcel data = Parcel.obtain(); data.writeInterfaceToken(IApplicationThread.descriptor); data.writeStrongBinder(token); @@ -871,6 +873,7 @@ class ApplicationThreadProxy implements IApplicationThread { } else { data.writeInt(0); } + data.writeInt(preserveWindow ? 1 : 0); mRemote.transact(SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION, data, null, IBinder.FLAG_ONEWAY); data.recycle(); @@ -898,7 +901,7 @@ class ApplicationThreadProxy implements IApplicationThread { IBinder.FLAG_ONEWAY); data.recycle(); } - + public final void scheduleReceiver(Intent intent, ActivityInfo info, CompatibilityInfo compatInfo, int resultCode, String resultData, Bundle map, boolean sync, int sendingUser, int processState) throws RemoteException { @@ -940,7 +943,7 @@ class ApplicationThreadProxy implements IApplicationThread { IBinder.FLAG_ONEWAY); data.recycle(); } - + public final void scheduleCreateService(IBinder token, ServiceInfo info, CompatibilityInfo compatInfo, int processState) throws RemoteException { Parcel data = Parcel.obtain(); @@ -1055,7 +1058,7 @@ class ApplicationThreadProxy implements IApplicationThread { IBinder.FLAG_ONEWAY); data.recycle(); } - + public final void scheduleExit() throws RemoteException { Parcel data = Parcel.obtain(); data.writeInterfaceToken(IApplicationThread.descriptor); @@ -1128,7 +1131,7 @@ class ApplicationThreadProxy implements IApplicationThread { mRemote.transact(DUMP_SERVICE_TRANSACTION, data, null, IBinder.FLAG_ONEWAY); data.recycle(); } - + public void dumpProvider(FileDescriptor fd, IBinder token, String[] args) throws RemoteException { Parcel data = Parcel.obtain(); |
