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

Commit 3d33072c authored by Priyanka Advani's avatar Priyanka Advani Committed by Android (Google) Code Review
Browse files

Merge "Revert "Notify DecorContentParent about content change"" into main

parents 0e8a83d6 7a637db1
Loading
Loading
Loading
Loading
+6 −21
Original line number Diff line number Diff line
@@ -537,14 +537,9 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
        }
        mContentParent.requestApplyInsets();
        final Callback cb = getCallback();
        if (!isDestroyed()) {
            if (cb != null) {
        if (cb != null && !isDestroyed()) {
            cb.onContentChanged();
        }
            if (mDecorContentParent != null) {
                mDecorContentParent.notifyContentChanged();
            }
        }
        mContentParentExplicitlySet = true;
    }

@@ -573,14 +568,9 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
        }
        mContentParent.requestApplyInsets();
        final Callback cb = getCallback();
        if (!isDestroyed()) {
            if (cb != null) {
        if (cb != null && !isDestroyed()) {
            cb.onContentChanged();
        }
            if (mDecorContentParent != null) {
                mDecorContentParent.notifyContentChanged();
            }
        }
        mContentParentExplicitlySet = true;
    }

@@ -596,14 +586,9 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
        mContentParent.addView(view, params);
        mContentParent.requestApplyInsets();
        final Callback cb = getCallback();
        if (!isDestroyed()) {
            if (cb != null) {
        if (cb != null && !isDestroyed()) {
            cb.onContentChanged();
        }
            if (mDecorContentParent != null) {
                mDecorContentParent.notifyContentChanged();
            }
        }
    }

    @Override
+0 −7
Original line number Diff line number Diff line
@@ -898,13 +898,6 @@ public class ActionBarOverlayLayout extends ViewGroup implements DecorContentPar
        mDecorToolbar.dismissPopupMenus();
    }

    @Override
    public void notifyContentChanged() {
        mLastBaseContentInsets.setEmpty();
        mLastBaseInnerInsets = WindowInsets.CONSUMED;
        mLastInnerInsets = WindowInsets.CONSUMED;
    }

    public static class LayoutParams extends MarginLayoutParams {
        public LayoutParams(Context c, AttributeSet attrs) {
            super(c, attrs);
+0 −2
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import android.os.Parcelable;
import android.util.SparseArray;
import android.view.Menu;
import android.view.Window;

import com.android.internal.view.menu.MenuPresenter;

/**
@@ -50,5 +49,4 @@ public interface DecorContentParent {
    void saveToolbarHierarchyState(SparseArray<Parcelable> toolbarStates);
    void restoreToolbarHierarchyState(SparseArray<Parcelable> toolbarStates);
    void dismissPopups();
    void notifyContentChanged();
}