Loading api/current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -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); core/java/android/view/WindowInsets.java +5 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); Loading Loading @@ -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; Loading @@ -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(); Loading Loading
api/current.txt +3 −3 Original line number Diff line number Diff line Loading @@ -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);
core/java/android/view/WindowInsets.java +5 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); Loading Loading @@ -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; Loading @@ -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(); Loading