summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/ActivityManagerNative.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/app/ActivityManagerNative.java')
-rw-r--r--core/java/android/app/ActivityManagerNative.java40
1 files changed, 38 insertions, 2 deletions
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index ec2868a..d220b00 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -1542,12 +1542,28 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
case CONVERT_TO_TRANSLUCENT_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
IBinder token = data.readStrongBinder();
- boolean converted = convertToTranslucent(token);
+ final Bundle bundle;
+ if (data.readInt() == 0) {
+ bundle = null;
+ } else {
+ bundle = data.readBundle();
+ }
+ final ActivityOptions options = bundle == null ? null : new ActivityOptions(bundle);
+ boolean converted = convertToTranslucent(token, options);
reply.writeNoException();
reply.writeInt(converted ? 1 : 0);
return true;
}
+ case GET_ACTIVITY_OPTIONS_TRANSACTION: {
+ data.enforceInterface(IActivityManager.descriptor);
+ IBinder token = data.readStrongBinder();
+ final ActivityOptions options = getActivityOptions(token);
+ reply.writeNoException();
+ reply.writeBundle(options == null ? null : options.toBundle());
+ return true;
+ }
+
case SET_IMMERSIVE_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
IBinder token = data.readStrongBinder();
@@ -4059,12 +4075,18 @@ class ActivityManagerProxy implements IActivityManager
return res;
}
- public boolean convertToTranslucent(IBinder token)
+ public boolean convertToTranslucent(IBinder token, ActivityOptions options)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(token);
+ if (options == null) {
+ data.writeInt(0);
+ } else {
+ data.writeInt(1);
+ data.writeBundle(options.toBundle());
+ }
mRemote.transact(CONVERT_TO_TRANSLUCENT_TRANSACTION, data, reply, 0);
reply.readException();
boolean res = reply.readInt() != 0;
@@ -4073,6 +4095,20 @@ class ActivityManagerProxy implements IActivityManager
return res;
}
+ public ActivityOptions getActivityOptions(IBinder token) throws RemoteException {
+ Parcel data = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ data.writeInterfaceToken(IActivityManager.descriptor);
+ data.writeStrongBinder(token);
+ mRemote.transact(GET_ACTIVITY_OPTIONS_TRANSACTION, data, reply, 0);
+ reply.readException();
+ Bundle bundle = reply.readBundle();
+ ActivityOptions options = bundle == null ? null : new ActivityOptions(bundle);
+ data.recycle();
+ reply.recycle();
+ return options;
+ }
+
public void setImmersive(IBinder token, boolean immersive)
throws RemoteException {
Parcel data = Parcel.obtain();