diff options
author | Craig Mautner <cmautner@google.com> | 2014-02-25 18:49:37 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-02-25 18:49:37 +0000 |
commit | d4c819c0029da8fb7248564aefde2146d5ecfc19 (patch) | |
tree | aa493810ed3990cd23912a9b15d227ec4ef7df3e /core/java | |
parent | 860ac9e45f496604757cb27f248def98878f82bb (diff) | |
parent | dd9ce6287eb9ccae8d527e6750c91b0bd47834fc (diff) | |
download | frameworks_base-d4c819c0029da8fb7248564aefde2146d5ecfc19.zip frameworks_base-d4c819c0029da8fb7248564aefde2146d5ecfc19.tar.gz frameworks_base-d4c819c0029da8fb7248564aefde2146d5ecfc19.tar.bz2 |
am dd9ce628: Merge "Clean up activities and displays when done" into klp-modular-dev
* commit 'dd9ce6287eb9ccae8d527e6750c91b0bd47834fc':
Clean up activities and displays when done
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/app/ActivityManagerNative.java | 21 | ||||
-rw-r--r-- | core/java/android/app/ActivityView.java | 6 | ||||
-rw-r--r-- | core/java/android/app/IActivityManager.java | 5 |
3 files changed, 31 insertions, 1 deletions
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java index 7b81713..7695ecc 100644 --- a/core/java/android/app/ActivityManagerNative.java +++ b/core/java/android/app/ActivityManagerNative.java @@ -2036,6 +2036,15 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } + case DELETE_ACTIVITY_CONTAINER_TRANSACTION: { + data.enforceInterface(IActivityManager.descriptor); + IActivityContainer activityContainer = + IActivityContainer.Stub.asInterface(data.readStrongBinder()); + deleteActivityContainer(activityContainer); + reply.writeNoException(); + return true; + } + case GET_ACTIVITY_CONTAINER_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); IBinder activityToken = data.readStrongBinder(); @@ -4692,6 +4701,18 @@ class ActivityManagerProxy implements IActivityManager return res; } + public void deleteActivityContainer(IActivityContainer activityContainer) + throws RemoteException { + Parcel data = Parcel.obtain(); + Parcel reply = Parcel.obtain(); + data.writeInterfaceToken(IActivityManager.descriptor); + data.writeStrongBinder(activityContainer.asBinder()); + mRemote.transact(DELETE_ACTIVITY_CONTAINER_TRANSACTION, data, reply, 0); + reply.readException(); + data.recycle(); + reply.recycle(); + } + public IActivityContainer getEnclosingActivityContainer(IBinder activityToken) throws RemoteException { Parcel data = Parcel.obtain(); diff --git a/core/java/android/app/ActivityView.java b/core/java/android/app/ActivityView.java index 14f0829..113f123 100644 --- a/core/java/android/app/ActivityView.java +++ b/core/java/android/app/ActivityView.java @@ -37,6 +37,7 @@ import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; +/** @hide */ public class ActivityView extends ViewGroup { private final String TAG = "ActivityView"; private final boolean DEBUG = false; @@ -107,6 +108,10 @@ public class ActivityView extends ViewGroup { super.onDetachedFromWindow(); if (mActivityContainer != null) { detach(); + try { + ActivityManagerNative.getDefault().deleteActivityContainer(mActivityContainer); + } catch (RemoteException e) { + } mActivityContainer = null; } } @@ -122,7 +127,6 @@ public class ActivityView extends ViewGroup { case View.INVISIBLE: break; case View.GONE: - detach(); break; } } diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java index 3ed3f7b..02a6343 100644 --- a/core/java/android/app/IActivityManager.java +++ b/core/java/android/app/IActivityManager.java @@ -407,9 +407,13 @@ public interface IActivityManager extends IInterface { public void performIdleMaintenance() throws RemoteException; + /** @hide */ public IActivityContainer createActivityContainer(IBinder parentActivityToken, IActivityContainerCallback callback) throws RemoteException; + /** @hide */ + public void deleteActivityContainer(IActivityContainer container) throws RemoteException; + public IActivityContainer getEnclosingActivityContainer(IBinder activityToken) throws RemoteException; @@ -703,4 +707,5 @@ public interface IActivityManager extends IInterface { 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 DELETE_ACTIVITY_CONTAINER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+185; } |