Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c2e8eaf authored by Shawn Lin's avatar Shawn Lin Committed by Android (Google) Code Review
Browse files

Merge "Fixed the conflict of the release methods of ActivityView & TaskEmbedder" into rvc-dev

parents ae9ce971 2806269a
Loading
Loading
Loading
Loading
+4 −11
Original line number Original line Diff line number Diff line
@@ -360,18 +360,9 @@ public class ActivityView extends ViewGroup implements android.window.TaskEmbedd
    }
    }


    /**
    /**
     * Release this container. Activity launching will no longer be permitted.
     * Release this container if it is initialized. 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
     */
     */
    public void release() {
    public void release() {
        if (!mTaskEmbedder.isInitialized()) {
            throw new IllegalStateException(
                    "Trying to release container that is not initialized.");
        }
        performRelease();
        performRelease();
    }
    }


@@ -487,7 +478,9 @@ public class ActivityView extends ViewGroup implements android.window.TaskEmbedd
            return;
            return;
        }
        }
        mSurfaceView.getHolder().removeCallback(mSurfaceCallback);
        mSurfaceView.getHolder().removeCallback(mSurfaceCallback);
        if (mTaskEmbedder.isInitialized()) {
            mTaskEmbedder.release();
            mTaskEmbedder.release();
        }
        mTaskEmbedder.setListener(null);
        mTaskEmbedder.setListener(null);


        mGuard.close();
        mGuard.close();
+1 −5
Original line number Original line Diff line number Diff line
@@ -746,11 +746,7 @@ public class BubbleExpandedView extends LinearLayout {
        if (mActivityView == null) {
        if (mActivityView == null) {
            return;
            return;
        }
        }
        switch (mActivityViewStatus) {
            case INITIALIZED:
            case ACTIVITY_STARTED:
        mActivityView.release();
        mActivityView.release();
        }
        if (mTaskId != -1) {
        if (mTaskId != -1) {
            try {
            try {
                ActivityTaskManager.getService().removeTask(mTaskId);
                ActivityTaskManager.getService().removeTask(mTaskId);