summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorCraig Mautner <cmautner@google.com>2015-02-17 23:30:33 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-02-17 23:30:34 +0000
commita94e42970d4e664e193cde0cf2700cb7e15961c9 (patch)
treeb813b9e2e3bb2c429de05c5ac12822af9972c771 /core
parentd5471a0b2bf938cf83f4abac66a18664d8ca5277 (diff)
parentca0653a424f9d0f64ad15236c882af2b8ed2fe00 (diff)
downloadframeworks_base-a94e42970d4e664e193cde0cf2700cb7e15961c9.zip
frameworks_base-a94e42970d4e664e193cde0cf2700cb7e15961c9.tar.gz
frameworks_base-a94e42970d4e664e193cde0cf2700cb7e15961c9.tar.bz2
Merge "Do not make ActivityContainer available to apps. DO NOT MERGE" into lmp-mr1-dev
Diffstat (limited to 'core')
-rw-r--r--core/java/android/app/ActivityManagerNative.java29
-rw-r--r--core/java/android/app/ActivityThread.java5
-rw-r--r--core/java/android/app/IActivityManager.java5
3 files changed, 12 insertions, 27 deletions
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index e8d08b8..8c57169 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -17,7 +17,6 @@
package android.app;
import android.app.ActivityManager.StackInfo;
-import android.app.ProfilerInfo;
import android.content.ComponentName;
import android.content.IIntentReceiver;
import android.content.IIntentSender;
@@ -2209,17 +2208,12 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
return true;
}
- case GET_ACTIVITY_CONTAINER_TRANSACTION: {
+ case GET_ACTIVITY_DISPLAY_ID_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
IBinder activityToken = data.readStrongBinder();
- IActivityContainer activityContainer = getEnclosingActivityContainer(activityToken);
+ int displayId = getActivityDisplayId(activityToken);
reply.writeNoException();
- if (activityContainer != null) {
- reply.writeInt(1);
- reply.writeStrongBinder(activityContainer.asBinder());
- } else {
- reply.writeInt(0);
- }
+ reply.writeInt(displayId);
return true;
}
@@ -5238,26 +5232,21 @@ class ActivityManagerProxy implements IActivityManager
reply.recycle();
}
- public IActivityContainer getEnclosingActivityContainer(IBinder activityToken)
- throws RemoteException {
+ @Override
+ public int getActivityDisplayId(IBinder activityToken) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(activityToken);
- mRemote.transact(GET_ACTIVITY_CONTAINER_TRANSACTION, data, reply, 0);
+ mRemote.transact(GET_ACTIVITY_DISPLAY_ID_TRANSACTION, data, reply, 0);
reply.readException();
- final int result = reply.readInt();
- final IActivityContainer res;
- if (result == 1) {
- res = IActivityContainer.Stub.asInterface(reply.readStrongBinder());
- } else {
- res = null;
- }
+ final int displayId = reply.readInt();
data.recycle();
reply.recycle();
- return res;
+ return displayId;
}
+ @Override
public IBinder getHomeActivityToken() throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index f2be45c..8353d54 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -2339,10 +2339,7 @@ public final class ActivityThread {
final DisplayManagerGlobal dm = DisplayManagerGlobal.getInstance();
try {
- IActivityContainer container =
- ActivityManagerNative.getDefault().getEnclosingActivityContainer(r.token);
- final int displayId =
- container == null ? Display.DEFAULT_DISPLAY : container.getDisplayId();
+ final int displayId = ActivityManagerNative.getDefault().getActivityDisplayId(r.token);
if (displayId > Display.DEFAULT_DISPLAY) {
Display display = dm.getRealDisplay(displayId, r.token);
baseContext = appContext.createDisplayContext(display);
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index e505d69..dd3a38b 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -438,8 +438,7 @@ public interface IActivityManager extends IInterface {
public void deleteActivityContainer(IActivityContainer container) throws RemoteException;
- public IActivityContainer getEnclosingActivityContainer(IBinder activityToken)
- throws RemoteException;
+ public int getActivityDisplayId(IBinder activityToken) throws RemoteException;
public IBinder getHomeActivityToken() throws RemoteException;
@@ -754,7 +753,7 @@ public interface IActivityManager extends IInterface {
int GET_PERSISTED_URI_PERMISSIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+181;
int APP_NOT_RESPONDING_VIA_PROVIDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+182;
int GET_HOME_ACTIVITY_TOKEN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+183;
- int GET_ACTIVITY_CONTAINER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+184;
+ int GET_ACTIVITY_DISPLAY_ID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+184;
int DELETE_ACTIVITY_CONTAINER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+185;