/frameworks/base/graphics/java/android/graphics/ |
D | Insets.java | 33 public final class Insets implements Parcelable { class 34 public static final @NonNull Insets NONE = new Insets(0, 0, 0, 0); 41 private Insets(int left, int top, int right, int bottom) { in Insets() method in Insets 60 public static @NonNull Insets of(int left, int top, int right, int bottom) { in of() 64 return new Insets(left, top, right, bottom); in of() 74 public static @NonNull Insets of(@Nullable Rect r) { in of() 94 public static @NonNull Insets add(@NonNull Insets a, @NonNull Insets b) { in add() 95 return Insets.of(a.left + b.left, a.top + b.top, a.right + b.right, a.bottom + b.bottom); in add() 105 public static @NonNull Insets subtract(@NonNull Insets a, @NonNull Insets b) { in subtract() 106 return Insets.of(a.left - b.left, a.top - b.top, a.right - b.right, a.bottom - b.bottom); in subtract() [all …]
|
/frameworks/base/core/tests/coretests/src/android/view/ |
D | DisplayCutoutTest.java | 40 import android.graphics.Insets; 74 Insets.of(5, 6, 7, 8) /* safeInsets */, 142 assertThat(NO_CUTOUT.getWaterfallInsets(), equalTo(Insets.NONE)); in testHasCutout_noCutout() 174 createCutoutWaterfallOnly(Insets.of(5, 6, 7, 8)); in testGetWaterfallInsets() 175 assertEquals(Insets.of(5, 6, 7, 8), cutout.getWaterfallInsets()); in testGetWaterfallInsets() 185 density, Insets.NONE, null); in testGetCutoutPath() 196 density, Insets.NONE, null).getCutoutPath(); in testGetCutoutPath_caches() 198 density, Insets.NONE, null).getCutoutPath(); in testGetCutoutPath_caches() 208 density, Insets.NONE, null).getCutoutPath(); in testGetCutoutPath_wontCacheIfCutoutPathParerInfoChanged() 210 density, Insets.NONE, null).getCutoutPath(); in testGetCutoutPath_wontCacheIfCutoutPathParerInfoChanged() [all …]
|
D | InsetsSourceTest.java | 30 import android.graphics.Insets; 71 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsTop() 73 assertEquals(Insets.of(0, 100, 0, 0), insets); in testCalculateInsetsTop() 79 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsBottom() 81 assertEquals(Insets.of(0, 0, 0, 100), insets); in testCalculateInsetsBottom() 87 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsLeft() 89 assertEquals(Insets.of(100, 0, 0, 0), insets); in testCalculateInsetsLeft() 95 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsRight() 97 assertEquals(Insets.of(0, 0, 100, 0), insets); in testCalculateInsetsRight() 103 Insets insets = mSource.calculateInsets(new Rect(100, 0, 500, 500), in testCalculateInsets_overextend() [all …]
|
D | WindowInsetsTest.java | 25 import android.graphics.Insets; 61 Insets[] insets = new Insets[SIZE]; in compatInsets_layoutStable() 62 Insets[] maxInsets = new Insets[SIZE]; in compatInsets_layoutStable() 69 assertEquals(Insets.of(0, 10, 0, 0), windowInsets.getSystemWindowInsets()); in compatInsets_layoutStable()
|
D | InsetsAnimationControlImplTest.java | 34 import android.graphics.Insets; 104 mStatusLeash, true, new Point(0, 0), Insets.of(0, 100, 0, 0)), in setup() 112 mNavLeash, true, new Point(400, 0), Insets.of(0, 0, 100, 0)), in setup() 130 assertEquals(Insets.of(0, 100, 100, 0), mController.getShownStateInsets()); in testGetters() 131 assertEquals(Insets.of(0, 0, 0, 0), mController.getHiddenStateInsets()); in testGetters() 132 assertEquals(Insets.of(0, 100, 0, 0), mController.getCurrentInsets()); in testGetters() 145 mController.setInsetsAndAlpha(Insets.of(0, 30, 40, 0), 1f /* alpha */, in testChangeInsets() 148 assertEquals(Insets.of(0, 30, 40, 0), mController.getCurrentInsets()); in testChangeInsets() 165 Insets initialInsets = mController.getCurrentInsets(); in testChangeAlphaNoInsets() 174 mController.setInsetsAndAlpha(Insets.of(0, 30, 40, 0), 0.5f, 1f); in testChangeInsetsAndAlpha() [all …]
|
D | InsetsStateTest.java | 54 import android.graphics.Insets; 111 assertEquals(Insets.of(0, 100, 0, 100), insets.getSystemWindowInsets()); in testCalculateInsets() 112 assertEquals(Insets.of(0, 100, 0, 100), insets.getInsets(Type.all())); in testCalculateInsets() 115 assertEquals(Insets.of(0, 100, 0, 0), insets.getInsets(statusBars())); in testCalculateInsets() 116 assertEquals(Insets.of(0, 0, 0, 100), insets.getInsets(ime())); in testCalculateInsets() 131 assertEquals(Insets.of(0, 0, 0, 100), insets.getInsetsIgnoringVisibility(systemBars())); in testCalculateInsets_imeAndNav() 132 assertEquals(Insets.of(0, 0, 0, 200), insets.getSystemWindowInsets()); in testCalculateInsets_imeAndNav() 133 assertEquals(Insets.of(0, 0, 0, 200), insets.getInsets(Type.all())); in testCalculateInsets_imeAndNav() 134 assertEquals(Insets.of(0, 0, 0, 100), insets.getInsets(navigationBars())); in testCalculateInsets_imeAndNav() 135 assertEquals(Insets.of(0, 0, 0, 200), insets.getInsets(ime())); in testCalculateInsets_imeAndNav() [all …]
|
/frameworks/base/core/java/android/view/ |
D | WindowInsets.java | 46 import android.graphics.Insets; 84 private final Insets[] mTypeInsetsMap; 85 private final Insets[] mTypeMaxInsetsMap; 142 public WindowInsets(@Nullable Insets[] typeInsetsMap, in WindowInsets() 143 @Nullable Insets[] typeMaxInsetsMap, in WindowInsets() 158 ? new Insets[SIZE] in WindowInsets() 163 ? new Insets[SIZE] in WindowInsets() 226 static Insets getInsets(Insets[] typeInsetsMap, @InsetsType int typeMask) { in getInsets() 227 Insets result = null; in getInsets() 232 Insets insets = typeInsetsMap[indexOf(i)]; in getInsets() [all …]
|
D | InsetsResizeAnimationRunner.java | 33 import android.graphics.Insets; 68 final Insets fromInsets = fromState.calculateInsets( in InsetsResizeAnimationRunner() 70 final Insets toInsets = toState.calculateInsets( in InsetsResizeAnimationRunner() 73 new Bounds(Insets.min(fromInsets, toInsets), Insets.max(fromInsets, toInsets))); in InsetsResizeAnimationRunner() 185 public Insets getHiddenStateInsets() { in getHiddenStateInsets() 186 return Insets.NONE; in getHiddenStateInsets() 190 public Insets getShownStateInsets() { in getShownStateInsets() 191 return Insets.NONE; in getShownStateInsets() 195 public Insets getCurrentInsets() { in getCurrentInsets() 196 return Insets.NONE; in getCurrentInsets() [all …]
|
D | WindowInsetsAnimationController.java | 23 import android.graphics.Insets; 54 @NonNull Insets getHiddenStateInsets(); in getHiddenStateInsets() 69 @NonNull Insets getShownStateInsets(); in getShownStateInsets() 80 @NonNull Insets getCurrentInsets(); in getCurrentInsets() 138 void setInsetsAndAlpha(@Nullable Insets insets, @FloatRange(from = 0f, to = 1f) float alpha, in setInsetsAndAlpha()
|
D | WindowInsetsAnimation.java | 24 import android.graphics.Insets; 189 private final Insets mLowerBound; 190 private final Insets mUpperBound; 192 public Bounds(@NonNull Insets lowerBound, @NonNull Insets upperBound) { in Bounds() 216 public Insets getLowerBound() { in getLowerBound() 240 public Insets getUpperBound() { in getUpperBound() 256 public Bounds inset(@NonNull Insets insets) { in inset()
|
D | InsetsAnimationControlImpl.java | 51 import android.graphics.Insets; 91 private final Insets mHiddenInsets; 94 private final Insets mShownInsets; 108 private Insets mCurrentInsets; 109 private Insets mPendingInsets; 175 private boolean calculatePerceptible(Insets currentInsets, float currentAlpha) { in calculatePerceptible() 194 public Insets getHiddenStateInsets() { in getHiddenStateInsets() 199 public Insets getShownStateInsets() { in getShownStateInsets() 204 public Insets getCurrentInsets() { in getCurrentInsets() 253 public void setInsetsAndAlpha(Insets insets, float alpha, float fraction) { in setInsetsAndAlpha() [all …]
|
D | InsetsFrameProvider.java | 22 import android.graphics.Insets; 86 private Insets mInsetsSize = null; 111 private Insets mMinimalInsetsSizeInDisplayCutoutSafe = null; 178 public InsetsFrameProvider setInsetsSize(Insets insetsSize) { in setInsetsSize() 183 public Insets getInsetsSize() { in getInsetsSize() 206 Insets minimalInsetsSizeInDisplayCutoutSafe) { in setMinimalInsetsSizeInDisplayCutoutSafe() 211 public Insets getMinimalInsetsSizeInDisplayCutoutSafe() { in getMinimalInsetsSizeInDisplayCutoutSafe() 282 mInsetsSize = in.readTypedObject(Insets.CREATOR); in InsetsFrameProvider() 285 mMinimalInsetsSizeInDisplayCutoutSafe = in.readTypedObject(Insets.CREATOR); in InsetsFrameProvider() 353 private final Insets mInsetsSize; [all …]
|
D | InsetsSource.java | 31 import android.graphics.Insets; 276 public Insets calculateInsets(Rect relativeFrame, boolean ignoreVisibility) { in calculateInsets() 283 public Insets calculateVisibleInsets(Rect relativeFrame) { in calculateVisibleInsets() 288 private Insets calculateInsets(Rect relativeFrame, Rect frame, boolean ignoreVisibility) { in calculateInsets() 290 return Insets.NONE; in calculateInsets() 299 ? Insets.of(0, 0, 0, frame.height()) in calculateInsets() 300 : Insets.of(0, frame.height(), 0, 0); in calculateInsets() 307 return Insets.NONE; in calculateInsets() 313 return Insets.of(0, 0, 0, mTmpFrame.height()); in calculateInsets() 321 return Insets.of(mTmpFrame.width(), 0, 0, 0); in calculateInsets() [all …]
|
D | DisplayCutout.java | 39 import android.graphics.Insets; 96 ZERO_RECT, Insets.NONE, ZERO_RECT, ZERO_RECT, ZERO_RECT, ZERO_RECT, EMPTY_PARSER_INFO, 114 private static Insets sCachedWaterfallInsets; 128 private final Insets mWaterfallInsets; 422 public DisplayCutout(@NonNull Insets safeInsets, @Nullable Rect boundLeft, in DisplayCutout() 424 this(getCopyOrRef(safeInsets.toRect(), true), Insets.NONE, in DisplayCutout() 449 public DisplayCutout(@NonNull Insets safeInsets, @Nullable Rect boundLeft, in DisplayCutout() 451 @NonNull Insets waterfallInsets, @Nullable CutoutPathParserInfo info) { in DisplayCutout() 476 public DisplayCutout(@NonNull Insets safeInsets, @Nullable Rect boundLeft, in DisplayCutout() 478 @NonNull Insets waterfallInsets, @Nullable CutoutPathParserInfo info, in DisplayCutout() [all …]
|
/frameworks/base/core/java/android/view/animation/ |
D | ExtendAnimation.java | 21 import android.graphics.Insets; 30 protected Insets mFromInsets = Insets.NONE; 31 protected Insets mToInsets = Insets.NONE; 115 public ExtendAnimation(Insets fromInsets, Insets toInsets) { in ExtendAnimation() 135 this(Insets.of(-fromL, -fromT, -fromR, -fromB), Insets.of(-toL, -toT, -toR, -toB)); in ExtendAnimation() 163 mFromInsets = Insets.min(Insets.of( in initialize() 168 ), Insets.NONE); in initialize() 169 mToInsets = Insets.min(Insets.of( in initialize() 174 ), Insets.NONE); in initialize()
|
D | Transformation.java | 21 import android.graphics.Insets; 57 private Insets mInsets = Insets.NONE; 81 mInsets = Insets.NONE; in clear() 139 setInsets(Insets.add(getInsets(), t.getInsets())); in compose() 221 public void setInsets(Insets insets) { in setInsets() 230 mInsets = Insets.of(left, top, right, bottom); in setInsets() 237 public Insets getInsets() { in getInsets()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/widget/ |
D | ActionBarOverlayLayoutTest.java | 31 import android.graphics.Insets; 57 private static final Insets TOP_INSET_5 = Insets.of(0, 5, 0, 0); 58 private static final Insets TOP_INSET_25 = Insets.of(0, 25, 0, 0); 130 assertThat(mContentInsetsListener.captured, is(insetsWith(Insets.NONE, CONSUMED_CUTOUT))); in topInset_consumedCutout_notStable() 154 assertThat(mContentInsetsListener.captured, is(insetsWith(Insets.NONE, NO_CUTOUT))); in topInset_noCutout_notStable() 178 assertThat(mContentInsetsListener.captured, is(insetsWith(Insets.NONE, NO_CUTOUT))); in topInset_cutout_notStable() 203 assertThat(mContentInsetsListener.captured, is(insetsWith(Insets.NONE, NO_CUTOUT))); in topInset_cutout__hasContentOnApplyWindowInsetsListener() 228 assertThat(mContentInsetsListener.captured, is(insetsWith(Insets.NONE, NO_CUTOUT))); in topInset_noCutout__hasContentOnApplyWindowInsetsListener() 231 private WindowInsets insetsWith(Insets content, DisplayCutout cutout) { in insetsWith() 232 final Insets cutoutInsets = cutout != null in insetsWith() [all …]
|
/frameworks/base/core/java/com/android/internal/policy/ |
D | SystemBarUtils.java | 21 import android.graphics.Insets; 65 Insets insets; in getStatusBarHeightForRotation() 66 Insets waterfallInsets; in getStatusBarHeightForRotation() 68 insets = Insets.NONE; in getStatusBarHeightForRotation() 69 waterfallInsets = Insets.NONE; in getStatusBarHeightForRotation() 73 insets = Insets.of(rotated.getSafeInsets()); in getStatusBarHeightForRotation()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/ |
D | TvPipBoundsState.java | 27 import android.graphics.Insets; 74 private Insets mPipMenuPermanentDecorInsets = Insets.NONE; 76 private Insets mPipMenuTemporaryDecorInsets = Insets.NONE; 228 public void setPipMenuPermanentDecorInsets(@NonNull Insets permanentInsets) { in setPipMenuPermanentDecorInsets() 233 public Insets getPipMenuPermanentDecorInsets() { in getPipMenuPermanentDecorInsets() 237 public void setPipMenuTemporaryDecorInsets(@NonNull Insets temporaryDecorInsets) { in setPipMenuTemporaryDecorInsets() 242 public Insets getPipMenuTemporaryDecorInsets() { in getPipMenuTemporaryDecorInsets()
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/utils/ |
D | WmDisplayCutoutTest.java | 29 import android.graphics.Insets; 50 Insets.of(0, 100, 0, 0), 155 Insets.of(1, 2, 3, 4), null), in computeSafeInsets_waterfall() 166 Insets.of(0, 20, 0, 0), null), in computeSafeInsets_cutoutTop_greaterThan_waterfallTop() 177 Insets.of(0, 40, 0, 0), null), in computeSafeInsets_cutoutTop_lessThan_waterfallTop() 188 Insets.of(20, 0, 0, 0), null), in computeSafeInsets_cutoutLeft_greaterThan_waterfallLeft() 199 Insets.of(40, 0, 0, 0), null), in computeSafeInsets_cutoutLeft_lessThan_waterfallLeft() 210 Insets.of(0, 0, 0, 20), null), in computeSafeInsets_cutoutBottom_greaterThan_waterfallBottom() 221 Insets.of(0, 0, 0, 40), null), in computeSafeInsets_cutoutBottom_lessThan_waterfallBottom() 232 Insets.of(0, 0, 20, 0), null), in computeSafeInsets_cutoutRight_greaterThan_waterfallRight() [all …]
|
/frameworks/base/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/ |
D | BubblePositionerTest.kt | 22 import android.graphics.Insets 57 insets = Insets.of(0, 0, 0, 0) 69 val insets = Insets.of(10, 20, 5, 15) in testUpdate() 218 insets = Insets.of(10, 20, 5, 15), in testBubbleBarExpandedViewHeightAndWidth() 245 insets = Insets.of(10, 20, 5, 15), in testBubbleBarExpandedViewHeightAndWidth_screenWidthTooSmall() 266 insets = Insets.of(10, 20, 5, 15), in testGetExpandedViewHeight_max() 281 insets = Insets.of(10, 20, 5, 15), in testGetExpandedViewHeight_customHeight_valid() 310 insets = Insets.of(10, 20, 5, 15), in testGetExpandedViewHeight_customHeight_tooSmall() 339 insets = Insets.of(10, 20, 5, 15), in testGetMaxExpandedViewHeight_onLargeTablet() 360 insets = Insets.of(10, 20, 5, 15), in testAreBubblesBottomAligned_largeScreen_true() [all …]
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | InsetsSourceProviderTest.java | 32 import android.graphics.Insets; 73 assertEquals(Insets.of(0, 100, 0, 0), mProvider.getInsetsHint()); in testPostLayout() 78 assertEquals(Insets.of(0, 90, 0, 0), mProvider.getInsetsHint()); in testPostLayout() 90 assertEquals(Insets.NONE, mProvider.getInsetsHint()); in testPostLayout_invisible() 218 assertEquals(Insets.of(0, 100, 0, 0), mProvider.getInsetsHint()); in testUpdateSourceFrame() 224 assertEquals(Insets.of(0, 90, 0, 0), mProvider.getInsetsHint()); in testUpdateSourceFrame() 230 assertEquals(Insets.of(0, 90, 0, 0), mProvider.getInsetsHint()); in testUpdateSourceFrame() 235 assertEquals(Insets.of(0, 80, 0, 0), mProvider.getInsetsHint()); in testUpdateSourceFrame() 249 Insets insets = mImeSource.calculateInsets(new Rect(0, 0, 500, 500), in testUpdateSourceFrameForIme() 251 assertEquals(Insets.of(0, 0, 0, 0), insets); in testUpdateSourceFrameForIme() [all …]
|
/frameworks/base/core/java/android/util/ |
D | RotationUtils.java | 25 import android.graphics.Insets; 45 public static Insets rotateInsets(Insets insets, @Rotation int rotation) { in rotateInsets() 46 if (insets == null || insets == Insets.NONE) { in rotateInsets() 49 Insets rotated; in rotateInsets() 55 rotated = Insets.of( in rotateInsets() 62 rotated = Insets.of( in rotateInsets() 69 rotated = Insets.of( in rotateInsets()
|
/frameworks/base/core/java/com/android/internal/util/ |
D | ScreenshotRequest.java | 28 import android.graphics.Insets; 55 private final Insets mInsets; 60 Bitmap bitmap, Rect boundsInScreen, Insets insets) { in ScreenshotRequest() 79 mInsets = in.readTypedObject(Insets.CREATOR); in ScreenshotRequest() 100 public Insets getInsets() { in getInsets() 160 private Insets mInsets = Insets.NONE; 254 public Builder setInsets(@NonNull Insets insets) { in setInsets()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/ |
D | WindowMetricsProvider.kt | 3 import android.graphics.Insets 14 val currentWindowInsets: Insets 25 override val currentWindowInsets: Insets
|