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

Commit feb0dfc0 authored by Filip Gruszczynski's avatar Filip Gruszczynski Committed by Android (Google) Code Review
Browse files

Merge "Fix recents crashing during docked stack resize."

parents 9c57f462 14418daa
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -3956,13 +3956,12 @@ public final class ActivityThread {
                }
                IBinder wtoken = v.getWindowToken();
                if (r.activity.mWindowAdded) {
                    boolean reuseForResize = r.window.hasNonClientDecorView() && r.mPreserveWindow;
                    if (r.onlyLocalRequest || reuseForResize) {
                    if (r.onlyLocalRequest || r.mPreserveWindow) {
                        // Hold off on removing this until the new activity's
                        // window is being added.
                        r.mPendingRemoveWindow = r.window;
                        r.mPendingRemoveWindowManager = wm;
                        if (reuseForResize) {
                        if (r.mPreserveWindow) {
                            // We can only keep the part of the view hierarchy that we control,
                            // everything else must be removed, because it might not be able to
                            // behave properly when activity is relaunching.
+1 −12
Original line number Diff line number Diff line
@@ -28,9 +28,8 @@ import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.media.session.MediaController;
import android.net.Uri;
import android.os.Bundle;
@@ -2007,16 +2006,6 @@ public abstract class Window {
     */
    public abstract void setNavigationBarColor(@ColorInt int color);

    /**
     * Get information whether the activity has non client decoration view. These views are used in
     * the multi window environment, to provide dragging handle and maximize/close buttons.
     *
     * @hide
     */
    public boolean hasNonClientDecorView() {
        return false;
    }

    /** @hide */
    public void setTheme(int resId) {
    }
+1 −7
Original line number Diff line number Diff line
@@ -488,7 +488,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
    }

    public void clearContentView() {
        if (mNonClientDecorView.getChildCount() > 1) {
        if (mNonClientDecorView != null && mNonClientDecorView.getChildCount() > 1) {
            mNonClientDecorView.removeViewAt(1);
        }
    }
@@ -5413,15 +5413,9 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
     * @Return Returns true if the window should show a shadow.
     **/
    private boolean nonClientDecorHasShadow(int workspaceId) {
        // TODO(skuhne): Add side by side mode here to add a decor.
        return workspaceId == FREEFORM_WORKSPACE_STACK_ID;
    }

    @Override
    public boolean hasNonClientDecorView() {
        return mNonClientDecorView != null;
    }

    @Override
    public void setTheme(int resid) {
        mTheme = resid;