/frameworks/base/graphics/java/android/graphics/ |
D | Insets.java | 32 public final class Insets implements Parcelable { class 33 public static final @NonNull Insets NONE = new Insets(0, 0, 0, 0); 40 private Insets(int left, int top, int right, int bottom) { in Insets() method in Insets 59 public static @NonNull Insets of(int left, int top, int right, int bottom) { in of() 63 return new Insets(left, top, right, bottom); in of() 73 public static @NonNull Insets of(@Nullable Rect r) { in of() 93 public static @NonNull Insets add(@NonNull Insets a, @NonNull Insets b) { in add() 94 return Insets.of(a.left + b.left, a.top + b.top, a.right + b.right, a.bottom + b.bottom); in add() 104 public static @NonNull Insets subtract(@NonNull Insets a, @NonNull Insets b) { in subtract() 105 return Insets.of(a.left - b.left, a.top - b.top, a.right - b.right, a.bottom - b.bottom); in subtract() [all …]
|
D | Insets.aidl | 20 parcelable Insets;
|
/frameworks/base/core/java/android/view/ |
D | WindowInsets.java | 39 import android.graphics.Insets; 71 private final Insets[] mTypeInsetsMap; 72 private final Insets[] mTypeMaxInsetsMap; 130 public WindowInsets(@Nullable Insets[] typeInsetsMap, in WindowInsets() 131 @Nullable Insets[] typeMaxInsetsMap, in WindowInsets() 137 ? new Insets[SIZE] in WindowInsets() 142 ? new Insets[SIZE] in WindowInsets() 180 private static Insets getInsets(Insets[] typeInsetsMap, @InsetType int typeMask) { in getInsets() 181 Insets result = null; in getInsets() 186 Insets insets = typeInsetsMap[indexOf(i)]; in getInsets() [all …]
|
D | WindowInsetsAnimationListener.java | 19 import android.graphics.Insets; 65 private final Insets mLowerBound; 66 private final Insets mUpperBound; 71 InsetsAnimation(int typeMask, Insets lowerBound, Insets upperBound) { in InsetsAnimation() 110 public Insets getLowerBound() { in getLowerBound() 118 public Insets getUpperBound() { in getUpperBound()
|
D | InsetsAnimationControlImpl.java | 26 import android.graphics.Insets; 61 private final Insets mHiddenInsets; 64 private final Insets mShownInsets; 72 private Insets mCurrentInsets; 73 private Insets mPendingInsets; 107 public Insets getHiddenStateInsets() { in getHiddenStateInsets() 112 public Insets getShownStateInsets() { in getShownStateInsets() 117 public Insets getCurrentInsets() { in getCurrentInsets() 128 public void changeInsets(Insets insets) { in changeInsets() 149 final Insets offset = Insets.subtract(mShownInsets, mPendingInsets); in applyChangeInsets() [all …]
|
D | InsetsSource.java | 19 import android.graphics.Insets; 80 public Insets calculateInsets(Rect relativeFrame, boolean ignoreVisibility) { in calculateInsets() 82 return Insets.NONE; in calculateInsets() 85 return Insets.NONE; in calculateInsets() 91 return Insets.of(0, mTmpFrame.height(), 0, 0); in calculateInsets() 93 return Insets.of(0, 0, 0, mTmpFrame.height()); in calculateInsets() 99 return Insets.of(mTmpFrame.width(), 0, 0, 0); in calculateInsets() 101 return Insets.of(0, 0, mTmpFrame.width(), 0); in calculateInsets() 104 return Insets.NONE; in calculateInsets()
|
D | WindowInsetsAnimationController.java | 20 import android.graphics.Insets; 40 @NonNull Insets getHiddenStateInsets(); in getHiddenStateInsets() 55 @NonNull Insets getShownStateInsets(); in getShownStateInsets() 60 @NonNull Insets getCurrentInsets(); in getCurrentInsets() 91 void changeInsets(@NonNull Insets insets); in changeInsets()
|
D | InsetsState.java | 28 import android.graphics.Insets; 148 Insets[] typeInsetsMap = new Insets[Type.SIZE]; in calculateInsets() 149 Insets[] typeMaxInsetsMap = new Insets[Type.SIZE]; in calculateInsets() 190 Insets[] typeInsetsMap, @Nullable @InsetSide SparseIntArray typeSideMap, in processSource() 192 Insets insets = source.calculateInsets(relativeFrame, ignoreVisibility); in processSource() 209 private void processSourceAsPublicType(InsetsSource source, Insets[] typeInsetsMap, in processSourceAsPublicType() 211 @Nullable boolean[] typeVisibilityMap, Insets insets, int type) { in processSourceAsPublicType() 213 Insets existing = typeInsetsMap[index]; in processSourceAsPublicType() 217 typeInsetsMap[index] = Insets.max(existing, insets); in processSourceAsPublicType() 224 if (typeSideMap != null && !Insets.NONE.equals(insets)) { in processSourceAsPublicType() [all …]
|
D | InsetsController.java | 29 import android.graphics.Insets; 69 private static TypeEvaluator<Insets> sEvaluator = (fraction, startValue, endValue) -> Insets.of( 78 private static class InsetsProperty extends Property<WindowInsetsAnimationController, Insets> { 80 super(Insets.class, "Insets"); in InsetsProperty() 84 public Insets get(WindowInsetsAnimationController object) { in get() 88 public void set(WindowInsetsAnimationController object, Insets value) { in set()
|
D | IWindowManager.aidl | 28 import android.graphics.Insets; 441 void setForwardedInsets(int displayId, in Insets insets); in setForwardedInsets()
|
/frameworks/base/core/tests/coretests/src/android/view/ |
D | InsetsSourceTest.java | 23 import android.graphics.Insets; 56 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsTop() 58 assertEquals(Insets.of(0, 100, 0, 0), insets); in testCalculateInsetsTop() 64 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsBottom() 66 assertEquals(Insets.of(0, 0, 0, 100), insets); in testCalculateInsetsBottom() 72 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsLeft() 74 assertEquals(Insets.of(100, 0, 0, 0), insets); in testCalculateInsetsLeft() 80 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsRight() 82 assertEquals(Insets.of(0, 0, 100, 0), insets); in testCalculateInsetsRight() 88 Insets insets = mSource.calculateInsets(new Rect(100, 0, 500, 500), in testCalculateInsets_overextend() [all …]
|
D | WindowInsetsTest.java | 26 import android.graphics.Insets; 62 b.setInsets(sideBars(), Insets.of(0, 0, 0, 100)); in typeMap() 63 b.setInsets(ime(), Insets.of(0, 0, 0, 300)); in typeMap() 72 b.setSystemWindowInsets(Insets.of(0, 50, 30, 10)); in compatInsets() 74 assertEquals(Insets.of(0, 50, 0, 0), insets.getInsets(topBar())); in compatInsets() 75 assertEquals(Insets.of(0, 0, 30, 10), insets.getInsets(sideBars())); in compatInsets() 82 b.setInsets(sideBars(), Insets.of(0, 0, 0, 100)); in visibility() 83 b.setInsets(ime(), Insets.of(0, 0, 0, 300)); in visibility() 96 b.setInsets(ime(), Insets.of(0, 0, 0, 300)); in consume_doesntChangeVisibility()
|
D | InsetsStateTest.java | 35 import android.graphics.Insets; 75 assertEquals(Insets.of(0, 100, 0, 100), insets.getSystemWindowInsets()); in testCalculateInsets() 76 assertEquals(Insets.of(0, 100, 0, 100), insets.getInsets(Type.all())); in testCalculateInsets() 79 assertEquals(Insets.of(0, 100, 0, 0), insets.getInsets(Type.topBar())); in testCalculateInsets() 80 assertEquals(Insets.of(0, 0, 0, 100), insets.getInsets(Type.ime())); in testCalculateInsets() 95 assertEquals(Insets.of(0, 0, 0, 100), insets.getMaxInsets(Type.systemBars())); in testCalculateInsets_imeAndNav() 96 assertEquals(Insets.of(0, 0, 0, 200), insets.getSystemWindowInsets()); in testCalculateInsets_imeAndNav() 97 assertEquals(Insets.of(0, 0, 0, 200), insets.getInsets(Type.all())); in testCalculateInsets_imeAndNav() 98 assertEquals(Insets.of(0, 0, 0, 100), insets.getInsets(Type.sideBars())); in testCalculateInsets_imeAndNav() 99 assertEquals(Insets.of(0, 0, 0, 200), insets.getInsets(Type.ime())); in testCalculateInsets_imeAndNav() [all …]
|
D | ViewRootImplTest.java | 23 import android.graphics.Insets; 62 assertThat(insets.getSystemWindowInsets(), equalTo(Insets.NONE)); in negativeInsets_areSetToZero() 63 assertThat(insets.getStableInsets(), equalTo(Insets.NONE)); in negativeInsets_areSetToZero() 72 assertThat(insets.getSystemWindowInsets(), equalTo(Insets.of(0, 20, 0, 40))); in negativeInsets_areSetToZero_positiveAreLeftAsIs() 73 assertThat(insets.getStableInsets(), equalTo(Insets.of(10, 0, 30, 0))); in negativeInsets_areSetToZero_positiveAreLeftAsIs() 82 assertThat(insets.getSystemWindowInsets(), equalTo(Insets.of(10, 20, 30, 40))); in positiveInsets_areLeftAsIs() 83 assertThat(insets.getStableInsets(), equalTo(Insets.of(10, 20, 30, 40))); in positiveInsets_areLeftAsIs()
|
D | InsetsAnimationControlImplTest.java | 33 import android.graphics.Insets; 125 assertEquals(Insets.of(0, 100, 100, 0), mController.getShownStateInsets()); in testGetters() 126 assertEquals(Insets.of(0, 0, 0, 0), mController.getHiddenStateInsets()); in testGetters() 127 assertEquals(Insets.of(0, 100, 0, 0), mController.getCurrentInsets()); in testGetters() 133 mController.changeInsets(Insets.of(0, 30, 40, 0)); in testChangeInsets() 135 assertEquals(Insets.of(0, 30, 40, 0), mController.getCurrentInsets()); in testChangeInsets() 156 assertEquals(Insets.of(0, 0, 100, 0), mController.getCurrentInsets()); in testFinishing() 164 mController.changeInsets(Insets.NONE); in testCancelled()
|
D | DisplayCutoutTest.java | 32 import android.graphics.Insets; 65 Insets.of(5, 6, 7, 8) /* safeInsets */, 360 Insets safeInset = Insets.of(left, top, right, bottom); in createCutoutWithInsets()
|
D | ImeInsetsSourceConsumerTest.java | 27 import android.graphics.Insets; 76 Insets.of(10, 10, 10, 10), rect, rect, rect, rect), in setup()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/widget/ |
D | ActionBarOverlayLayoutTest.java | 30 import android.graphics.Insets; 54 private static final Insets TOP_INSET_5 = Insets.of(0, 5, 0, 0); 55 private static final Insets TOP_INSET_25 = Insets.of(0, 25, 0, 0); 119 assertThat(mContentInsetsListener.captured, is(insetsWith(Insets.NONE, CONSUMED_CUTOUT))); in topInset_consumedCutout_notStable() 143 assertThat(mContentInsetsListener.captured, is(insetsWith(Insets.NONE, NO_CUTOUT))); in topInset_noCutout_notStable() 167 assertThat(mContentInsetsListener.captured, is(insetsWith(Insets.NONE, NO_CUTOUT))); in topInset_cutout_notStable() 170 private WindowInsets insetsWith(Insets content, DisplayCutout cutout) { in insetsWith()
|
/frameworks/base/graphics/java/android/graphics/drawable/ |
D | NinePatchDrawable.java | 33 import android.graphics.Insets; 77 private Insets mOpticalInsets = Insets.NONE; 304 public Insets getOpticalInsets() { in getOpticalInsets() 305 final Insets opticalInsets = mOpticalInsets; in getOpticalInsets() 307 return Insets.of(opticalInsets.right, opticalInsets.top, in getOpticalInsets() 462 state.mOpticalInsets = Insets.of(opticalInsets); in updateStateFromTypedArray() 600 Insets mOpticalInsets = Insets.NONE; 624 mOpticalInsets = Insets.of(opticalInsets); in NinePatchState() 676 final Insets sourceOpticalInsets = mNinePatchState.mOpticalInsets; in computeBitmapSize() 677 if (sourceOpticalInsets != Insets.NONE) { in computeBitmapSize() [all …]
|
D | InsetDrawable.java | 26 import android.graphics.Insets; 246 public Insets getOpticalInsets() { in getOpticalInsets() 247 final Insets contentInsets = super.getOpticalInsets(); in getOpticalInsets() 249 return Insets.of( in getOpticalInsets()
|
D | BitmapDrawable.java | 33 import android.graphics.Insets; 106 private Insets mOpticalInsets = Insets.NONE; 624 mOpticalInsets = Insets.of(left, top, right, bottom); in updateDstRectAndInsetsIfDirty() 627 mOpticalInsets = Insets.NONE; in updateDstRectAndInsetsIfDirty() 634 public Insets getOpticalInsets() { in getOpticalInsets()
|
D | DrawableWrapper.java | 30 import android.graphics.Insets; 257 public Insets getOpticalInsets() { in getOpticalInsets() 258 return mDrawable != null ? mDrawable.getOpticalInsets() : Insets.NONE; in getOpticalInsets()
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | InsetsSourceProviderTest.java | 28 import android.graphics.Insets; 62 assertEquals(Insets.of(0, 100, 0, 0), in testPostLayout() 73 assertEquals(Insets.NONE, mProvider.getSource().calculateInsets(new Rect(0, 0, 500, 500), in testPostLayout_invisible()
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/utils/ |
D | WmDisplayCutoutTest.java | 31 import android.graphics.Insets; 51 Insets.of(0, 100, 0, 0),
|
/frameworks/base/core/java/android/widget/ |
D | Switch.java | 31 import android.graphics.Insets; 948 final Insets inset = mThumbDrawable.getOpticalInsets(); in onMeasure() 1195 final Insets insets = mThumbDrawable.getOpticalInsets(); in onLayout() 1247 final Insets thumbInsets; in draw() 1251 thumbInsets = Insets.NONE; in draw() 1266 if (thumbInsets != Insets.NONE) { in draw() 1321 final Insets insets = thumbDrawable.getOpticalInsets(); in onDraw() 1411 final Insets insets; in getThumbScrollRange() 1415 insets = Insets.NONE; in getThumbScrollRange()
|