Merge "Fixed the conflict of the release methods of ActivityView & TaskEmbedder" into rvc-dev am: 1c2e8eafff am: 3983dda63e am: a221212709
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11862402 Change-Id: I49b02768c8250b3f2743992a4da0d0507b64be55
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user