diff options
| author | 2020-06-16 09:32:15 +0000 | |
|---|---|---|
| committer | 2020-06-16 09:32:15 +0000 | |
| commit | 1c2e8eafffd0942c3289216a714dc043e5ddf89c (patch) | |
| tree | d65ab14b8656fb45400d261415ffe8db97981ac5 | |
| parent | ae9ce9716df477b99305c6fca39a3c3807bea9d0 (diff) | |
| parent | 2806269a5a4bb08c1f8694a4b601256db90728b1 (diff) | |
Merge "Fixed the conflict of the release methods of ActivityView & TaskEmbedder" into rvc-dev
| -rw-r--r-- | core/java/android/app/ActivityView.java | 15 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java | 6 |
2 files changed, 5 insertions, 16 deletions
diff --git a/core/java/android/app/ActivityView.java b/core/java/android/app/ActivityView.java index d650bbcdfa33..b749c3504811 100644 --- a/core/java/android/app/ActivityView.java +++ b/core/java/android/app/ActivityView.java @@ -360,18 +360,9 @@ public class ActivityView extends ViewGroup implements android.window.TaskEmbedd } /** - * Release this container. Activity launching will no longer be permitted. - * <p>Note: Calling this method is allowed after - * {@link StateCallback#onActivityViewReady(ActivityView)} callback was triggered and before - * {@link StateCallback#onActivityViewDestroyed(ActivityView)}. - * - * @see StateCallback + * Release this container if it is initialized. Activity launching will no longer be permitted. */ public void release() { - if (!mTaskEmbedder.isInitialized()) { - throw new IllegalStateException( - "Trying to release container that is not initialized."); - } performRelease(); } @@ -487,7 +478,9 @@ public class ActivityView extends ViewGroup implements android.window.TaskEmbedd return; } mSurfaceView.getHolder().removeCallback(mSurfaceCallback); - mTaskEmbedder.release(); + if (mTaskEmbedder.isInitialized()) { + mTaskEmbedder.release(); + } mTaskEmbedder.setListener(null); mGuard.close(); diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java index ca359b8efa5d..4acfbcea81ad 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java @@ -746,11 +746,7 @@ public class BubbleExpandedView extends LinearLayout { if (mActivityView == null) { return; } - switch (mActivityViewStatus) { - case INITIALIZED: - case ACTIVITY_STARTED: - mActivityView.release(); - } + mActivityView.release(); if (mTaskId != -1) { try { ActivityTaskManager.getService().removeTask(mTaskId); |