diff options
author | Craig Mautner <cmautner@google.com> | 2014-02-25 18:56:11 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-02-25 18:56:11 +0000 |
commit | b5abedbd5cef473574884a7453cdf4d412af26af (patch) | |
tree | 66a6ab625c6937f0a09c12071463004093a0a476 /core/java | |
parent | c1970190549519acde6719c777f53611674058cb (diff) | |
parent | c407ace3019c4e542654cf17fd04d9436d3f3436 (diff) | |
download | frameworks_base-b5abedbd5cef473574884a7453cdf4d412af26af.zip frameworks_base-b5abedbd5cef473574884a7453cdf4d412af26af.tar.gz frameworks_base-b5abedbd5cef473574884a7453cdf4d412af26af.tar.bz2 |
am c407ace3: am d4c819c0: am dd9ce628: Merge "Clean up activities and displays when done" into klp-modular-dev
* commit 'c407ace3019c4e542654cf17fd04d9436d3f3436':
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 b40008e..04155b5 100644 --- a/core/java/android/app/ActivityManagerNative.java +++ b/core/java/android/app/ActivityManagerNative.java @@ -2038,6 +2038,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(); @@ -4697,6 +4706,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 8c7fe10..bbf2ecc 100644 --- a/core/java/android/app/IActivityManager.java +++ b/core/java/android/app/IActivityManager.java @@ -408,9 +408,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; @@ -704,4 +708,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; } |