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

Commit faa19fce authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Remove outdated logic for relaunch with split screen"

parents a989c8f6 96be8d73
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -5773,10 +5773,6 @@ public final class ActivityThread extends ClientTransactionHandler

        handleRelaunchActivityInner(r, configChanges, tmp.pendingResults, tmp.pendingIntents,
                pendingActions, tmp.startsNotResumed, tmp.overrideConfig, "handleRelaunchActivity");
        if (pendingActions != null) {
            // Only report a successful relaunch to WindowManager.
            pendingActions.setReportRelaunchToWindowManager(true);
        }
    }

    void scheduleRelaunchActivity(IBinder token) {
@@ -5884,11 +5880,8 @@ public final class ActivityThread extends ClientTransactionHandler
    }

    @Override
    public void reportRelaunch(ActivityClientRecord r, PendingTransactionActions pendingActions) {
    public void reportRelaunch(ActivityClientRecord r) {
        ActivityClient.getInstance().activityRelaunched(r.token);
        if (pendingActions.shouldReportRelaunchToWindowManager() && r.window != null) {
            r.window.reportActivityRelaunched();
        }
    }

    private void callActivityOnSaveInstanceState(ActivityClientRecord r) {
+2 −5
Original line number Diff line number Diff line
@@ -234,9 +234,6 @@ public abstract class ClientTransactionHandler {
    /**
     * Report that relaunch request was handled.
     * @param r Target activity record.
     * @param pendingActions Pending actions initialized on earlier stages of activity transaction.
     *                       Used to check if we should report relaunch to WM.
     * */
    public abstract void reportRelaunch(@NonNull ActivityClientRecord r,
            PendingTransactionActions pendingActions);
     */
    public abstract void reportRelaunch(@NonNull ActivityClientRecord r);
}
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ public class ActivityRelaunchItem extends ActivityTransactionItem {
    public void postExecute(ClientTransactionHandler client, IBinder token,
            PendingTransactionActions pendingActions) {
        final ActivityClientRecord r = getActivityClientRecord(client, token);
        client.reportRelaunch(r, pendingActions);
        client.reportRelaunch(r);
    }

    // ObjectPoolItem implementation
+0 −19
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ public class PendingTransactionActions {
    private boolean mCallOnPostCreate;
    private Bundle mOldState;
    private StopInfo mStopInfo;
    private boolean mReportRelaunchToWM;

    public PendingTransactionActions() {
        clear();
@@ -92,24 +91,6 @@ public class PendingTransactionActions {
        mStopInfo = stopInfo;
    }

    /**
     * Check if we should report an activity relaunch to WindowManager. We report back for every
     * relaunch request to ActivityManager, but only for those that were actually finished to we
     * report to WindowManager.
     */
    public boolean shouldReportRelaunchToWindowManager() {
        return mReportRelaunchToWM;
    }

    /**
     * Set if we should report an activity relaunch to WindowManager. We report back for every
     * relaunch request to ActivityManager, but only for those that were actually finished we report
     * to WindowManager.
     */
    public void setReportRelaunchToWindowManager(boolean reportToWm) {
        mReportRelaunchToWM = reportToWm;
    }

    /** Reports to server about activity stop. */
    public static class StopInfo implements Runnable {
        private static final String TAG = "ActivityStopInfo";
+0 −17
Original line number Diff line number Diff line
@@ -515,8 +515,6 @@ public final class ViewRootImpl implements ViewParent,
    private boolean mInvalidateRootRequested;
    private int mCanvasOffsetX;
    private int mCanvasOffsetY;
    private boolean mActivityRelaunched;

    CompatibilityInfo.Translator mTranslator;

    @UnsupportedAppUsage
@@ -3021,11 +3019,6 @@ public final class ViewRootImpl implements ViewParent,
                        frame.height() < desiredWindowHeight && frame.height() != mHeight));
        windowShouldResize |= mDragResizing && mPendingDragResizing;

        // If the activity was just relaunched, it might have unfrozen the task bounds (while
        // relaunching), so we need to force a call into window manager to pick up the latest
        // bounds.
        windowShouldResize |= mActivityRelaunched;

        // Determine whether to compute insets.
        // If there are no inset listeners remaining then we may still need to compute
        // insets in case the old insets were non-empty and must be reset.
@@ -3640,7 +3633,6 @@ public final class ViewRootImpl implements ViewParent,
        mFirst = false;
        mWillDrawSoon = false;
        mNewSurfaceNeeded = false;
        mActivityRelaunched = false;
        mViewVisibility = viewVisibility;

        final boolean hasWindowFocus = mAttachInfo.mHasWindowFocus && isViewVisible;
@@ -10545,15 +10537,6 @@ public final class ViewRootImpl implements ViewParent,
        }
    }

    /**
     * Tells this instance that its corresponding activity has just relaunched. In this case, we
     * need to force a relayout of the window to make sure we get the correct bounds from window
     * manager.
     */
    public void reportActivityRelaunched() {
        mActivityRelaunched = true;
    }

    public SurfaceControl getSurfaceControl() {
        return mSurfaceControl;
    }
Loading