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

Commit 2d16430d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "WindowInsets: Add missing annotations and make Builder final"

parents 034ef816 9e860359
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -51982,16 +51982,16 @@ package android.view {
    method public boolean hasInsets();
    method public boolean hasStableInsets();
    method public boolean hasSystemWindowInsets();
    method @NonNull public android.view.WindowInsets inset(int, int, int, int);
    method @NonNull public android.view.WindowInsets inset(@IntRange(from=0) int, @IntRange(from=0) int, @IntRange(from=0) int, @IntRange(from=0) int);
    method public boolean isConsumed();
    method public boolean isRound();
    method @Deprecated @NonNull public android.view.WindowInsets replaceSystemWindowInsets(int, int, int, int);
    method @Deprecated @NonNull public android.view.WindowInsets replaceSystemWindowInsets(android.graphics.Rect);
  }
  public static class WindowInsets.Builder {
  public static final class WindowInsets.Builder {
    ctor public WindowInsets.Builder();
    ctor public WindowInsets.Builder(android.view.WindowInsets);
    ctor public WindowInsets.Builder(@NonNull android.view.WindowInsets);
    method @NonNull public android.view.WindowInsets build();
    method @NonNull public android.view.WindowInsets.Builder setDisplayCutout(@Nullable android.view.DisplayCutout);
    method @NonNull public android.view.WindowInsets.Builder setStableInsets(@NonNull android.graphics.Insets);
+5 −3
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import static android.view.WindowInsets.Type.compatSystemInsets;
import static android.view.WindowInsets.Type.indexOf;

import android.annotation.IntDef;
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UnsupportedAppUsage;
@@ -700,7 +701,8 @@ public final class WindowInsets {
     * @return the inset insets
     */
    @NonNull
    public WindowInsets inset(int left, int top, int right, int bottom) {
    public WindowInsets inset(@IntRange(from = 0) int left, @IntRange(from = 0) int top,
            @IntRange(from = 0) int right, @IntRange(from = 0) int bottom) {
        Preconditions.checkArgumentNonnegative(left);
        Preconditions.checkArgumentNonnegative(top);
        Preconditions.checkArgumentNonnegative(right);
@@ -794,7 +796,7 @@ public final class WindowInsets {
    /**
     * Builder for WindowInsets.
     */
    public static class Builder {
    public static final class Builder {

        private final Insets[] mTypeInsetsMap;
        private final Insets[] mTypeMaxInsetsMap;
@@ -821,7 +823,7 @@ public final class WindowInsets {
         *
         * @param insets the instance to initialize from.
         */
        public Builder(WindowInsets insets) {
        public Builder(@NonNull WindowInsets insets) {
            mTypeInsetsMap = insets.mTypeInsetsMap.clone();
            mTypeMaxInsetsMap = insets.mTypeMaxInsetsMap.clone();
            mTypeVisibilityMap = insets.mTypeVisibilityMap.clone();