Loading core/api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -15483,6 +15483,8 @@ package android.graphics { method @NonNull public String flattenToString(); method public int height(); method public void inset(int, int); method public void inset(@NonNull android.graphics.Insets); method public void inset(int, int, int, int); method @CheckResult public boolean intersect(int, int, int, int); method @CheckResult public boolean intersect(@NonNull android.graphics.Rect); method public boolean intersects(int, int, int, int); core/java/android/view/InsetsState.java +16 −0 Original line number Diff line number Diff line Loading @@ -238,6 +238,22 @@ public class InsetsState implements Parcelable { (legacySystemUiFlags & SYSTEM_UI_FLAG_LAYOUT_STABLE) != 0); } public Rect calculateInsets(Rect frame, @InsetsType int types, boolean ignoreVisibility) { Insets insets = Insets.NONE; for (int type = FIRST_TYPE; type <= LAST_TYPE; type++) { InsetsSource source = mSources[type]; if (source == null) { continue; } int publicType = InsetsState.toPublicType(type); if ((publicType & types) == 0) { continue; } insets = Insets.max(source.calculateInsets(frame, ignoreVisibility), insets); } return insets.toRect(); } public Rect calculateVisibleInsets(Rect frame, @SoftInputModeFlags int softInputMode) { Insets insets = Insets.NONE; for (int type = FIRST_TYPE; type <= LAST_TYPE; type++) { Loading core/java/android/view/ViewRootImpl.java +9 −8 Original line number Diff line number Diff line Loading @@ -1023,6 +1023,15 @@ public final class ViewRootImpl implements ViewParent, } mForceDecorViewVisibility = (mWindowAttributes.privateFlags & PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY) != 0; if (mView instanceof RootViewSurfaceTaker) { PendingInsetsController pendingInsetsController = ((RootViewSurfaceTaker) mView).providePendingInsetsController(); if (pendingInsetsController != null) { pendingInsetsController.replayAndAttach(mInsetsController); } } try { mOrigWindowType = mWindowAttributes.type; mAttachInfo.mRecomputeGlobalAttributes = true; Loading Loading @@ -1160,14 +1169,6 @@ public final class ViewRootImpl implements ViewParent, mFirstInputStage = nativePreImeStage; mFirstPostImeInputStage = earlyPostImeStage; mPendingInputEventQueueLengthCounterName = "aq:pending:" + counterSuffix; if (mView instanceof RootViewSurfaceTaker) { PendingInsetsController pendingInsetsController = ((RootViewSurfaceTaker) mView).providePendingInsetsController(); if (pendingInsetsController != null) { pendingInsetsController.replayAndAttach(mInsetsController); } } } } } Loading core/java/android/view/WindowInsets.java +3 −0 Original line number Diff line number Diff line Loading @@ -1344,6 +1344,9 @@ public final class WindowInsets { if ((types & NAVIGATION_BARS) != 0) { result.append("navigationBars |"); } if ((types & CAPTION_BAR) != 0) { result.append("captionBar |"); } if ((types & IME) != 0) { result.append("ime |"); } Loading core/proto/android/server/windowmanagerservice.proto +9 −9 Original line number Diff line number Diff line Loading @@ -239,9 +239,9 @@ message DisplayAreaChildProto { message DisplayFramesProto { option (.android.msg_privacy).dest = DEST_AUTOMATIC; optional .android.graphics.RectProto stable_bounds = 1; optional .android.graphics.RectProto dock = 2; optional .android.graphics.RectProto current = 3; optional .android.graphics.RectProto stable_bounds = 1 [deprecated=true]; optional .android.graphics.RectProto dock = 2 [deprecated=true]; optional .android.graphics.RectProto current = 3 [deprecated=true]; } message DisplayRotationProto { Loading Loading @@ -499,19 +499,19 @@ message WindowFramesProto { option (.android.msg_privacy).dest = DEST_AUTOMATIC; optional .android.graphics.RectProto containing_frame = 1; optional .android.graphics.RectProto content_frame = 2; optional .android.graphics.RectProto decor_frame = 3; optional .android.graphics.RectProto content_frame = 2 [deprecated=true]; optional .android.graphics.RectProto decor_frame = 3 [deprecated=true]; optional .android.graphics.RectProto display_frame = 4; optional .android.graphics.RectProto frame = 5; optional .android.graphics.RectProto outset_frame = 6; optional .android.graphics.RectProto overscan_frame = 7 [deprecated=true]; optional .android.graphics.RectProto parent_frame = 8; optional .android.graphics.RectProto visible_frame = 9; optional .android.graphics.RectProto visible_frame = 9 [deprecated=true]; optional .android.view.DisplayCutoutProto cutout = 10; optional .android.graphics.RectProto content_insets = 11; optional .android.graphics.RectProto content_insets = 11 [deprecated=true]; optional .android.graphics.RectProto overscan_insets = 12 [deprecated=true]; optional .android.graphics.RectProto visible_insets = 13; optional .android.graphics.RectProto stable_insets = 14; optional .android.graphics.RectProto visible_insets = 13 [deprecated=true]; optional .android.graphics.RectProto stable_insets = 14 [deprecated=true]; optional .android.graphics.RectProto outsets = 15; } Loading Loading
core/api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -15483,6 +15483,8 @@ package android.graphics { method @NonNull public String flattenToString(); method public int height(); method public void inset(int, int); method public void inset(@NonNull android.graphics.Insets); method public void inset(int, int, int, int); method @CheckResult public boolean intersect(int, int, int, int); method @CheckResult public boolean intersect(@NonNull android.graphics.Rect); method public boolean intersects(int, int, int, int);
core/java/android/view/InsetsState.java +16 −0 Original line number Diff line number Diff line Loading @@ -238,6 +238,22 @@ public class InsetsState implements Parcelable { (legacySystemUiFlags & SYSTEM_UI_FLAG_LAYOUT_STABLE) != 0); } public Rect calculateInsets(Rect frame, @InsetsType int types, boolean ignoreVisibility) { Insets insets = Insets.NONE; for (int type = FIRST_TYPE; type <= LAST_TYPE; type++) { InsetsSource source = mSources[type]; if (source == null) { continue; } int publicType = InsetsState.toPublicType(type); if ((publicType & types) == 0) { continue; } insets = Insets.max(source.calculateInsets(frame, ignoreVisibility), insets); } return insets.toRect(); } public Rect calculateVisibleInsets(Rect frame, @SoftInputModeFlags int softInputMode) { Insets insets = Insets.NONE; for (int type = FIRST_TYPE; type <= LAST_TYPE; type++) { Loading
core/java/android/view/ViewRootImpl.java +9 −8 Original line number Diff line number Diff line Loading @@ -1023,6 +1023,15 @@ public final class ViewRootImpl implements ViewParent, } mForceDecorViewVisibility = (mWindowAttributes.privateFlags & PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY) != 0; if (mView instanceof RootViewSurfaceTaker) { PendingInsetsController pendingInsetsController = ((RootViewSurfaceTaker) mView).providePendingInsetsController(); if (pendingInsetsController != null) { pendingInsetsController.replayAndAttach(mInsetsController); } } try { mOrigWindowType = mWindowAttributes.type; mAttachInfo.mRecomputeGlobalAttributes = true; Loading Loading @@ -1160,14 +1169,6 @@ public final class ViewRootImpl implements ViewParent, mFirstInputStage = nativePreImeStage; mFirstPostImeInputStage = earlyPostImeStage; mPendingInputEventQueueLengthCounterName = "aq:pending:" + counterSuffix; if (mView instanceof RootViewSurfaceTaker) { PendingInsetsController pendingInsetsController = ((RootViewSurfaceTaker) mView).providePendingInsetsController(); if (pendingInsetsController != null) { pendingInsetsController.replayAndAttach(mInsetsController); } } } } } Loading
core/java/android/view/WindowInsets.java +3 −0 Original line number Diff line number Diff line Loading @@ -1344,6 +1344,9 @@ public final class WindowInsets { if ((types & NAVIGATION_BARS) != 0) { result.append("navigationBars |"); } if ((types & CAPTION_BAR) != 0) { result.append("captionBar |"); } if ((types & IME) != 0) { result.append("ime |"); } Loading
core/proto/android/server/windowmanagerservice.proto +9 −9 Original line number Diff line number Diff line Loading @@ -239,9 +239,9 @@ message DisplayAreaChildProto { message DisplayFramesProto { option (.android.msg_privacy).dest = DEST_AUTOMATIC; optional .android.graphics.RectProto stable_bounds = 1; optional .android.graphics.RectProto dock = 2; optional .android.graphics.RectProto current = 3; optional .android.graphics.RectProto stable_bounds = 1 [deprecated=true]; optional .android.graphics.RectProto dock = 2 [deprecated=true]; optional .android.graphics.RectProto current = 3 [deprecated=true]; } message DisplayRotationProto { Loading Loading @@ -499,19 +499,19 @@ message WindowFramesProto { option (.android.msg_privacy).dest = DEST_AUTOMATIC; optional .android.graphics.RectProto containing_frame = 1; optional .android.graphics.RectProto content_frame = 2; optional .android.graphics.RectProto decor_frame = 3; optional .android.graphics.RectProto content_frame = 2 [deprecated=true]; optional .android.graphics.RectProto decor_frame = 3 [deprecated=true]; optional .android.graphics.RectProto display_frame = 4; optional .android.graphics.RectProto frame = 5; optional .android.graphics.RectProto outset_frame = 6; optional .android.graphics.RectProto overscan_frame = 7 [deprecated=true]; optional .android.graphics.RectProto parent_frame = 8; optional .android.graphics.RectProto visible_frame = 9; optional .android.graphics.RectProto visible_frame = 9 [deprecated=true]; optional .android.view.DisplayCutoutProto cutout = 10; optional .android.graphics.RectProto content_insets = 11; optional .android.graphics.RectProto content_insets = 11 [deprecated=true]; optional .android.graphics.RectProto overscan_insets = 12 [deprecated=true]; optional .android.graphics.RectProto visible_insets = 13; optional .android.graphics.RectProto stable_insets = 14; optional .android.graphics.RectProto visible_insets = 13 [deprecated=true]; optional .android.graphics.RectProto stable_insets = 14 [deprecated=true]; optional .android.graphics.RectProto outsets = 15; } Loading