/frameworks/base/core/java/android/view/ |
D | WindowInsets.java | 186 Insets insets = typeInsetsMap[indexOf(i)]; in getInsets() local 187 if (insets == null) { in getInsets() 191 result = insets; in getInsets() 193 result = Insets.max(result, insets); in getInsets() 202 private static void setInsets(Insets[] typeInsetsMap, @InsetType int typeMask, Insets insets) { in setInsets() argument 207 typeInsetsMap[indexOf(i)] = insets; in setInsets() 222 private static Insets[] createCompatTypeMap(@Nullable Rect insets) { in createCompatTypeMap() argument 223 if (insets == null) { in createCompatTypeMap() 227 assignCompatInsets(typeInsetMap, insets); in createCompatTypeMap() 234 static void assignCompatInsets(Insets[] typeInsetMap, Rect insets) { in assignCompatInsets() argument [all …]
|
D | InsetsState.java | 192 Insets insets = source.calculateInsets(relativeFrame, ignoreVisibility); in processSource() local 196 insets, type); in processSource() 205 insets, SYSTEM_GESTURES); in processSource() 211 @Nullable boolean[] typeVisibilityMap, Insets insets, int type) { in processSourceAsPublicType() argument 215 typeInsetsMap[index] = insets; in processSourceAsPublicType() 217 typeInsetsMap[index] = Insets.max(existing, insets); in processSourceAsPublicType() 224 if (typeSideMap != null && !Insets.NONE.equals(insets)) { in processSourceAsPublicType() 225 @InsetSide int insetSide = getInsetSide(insets); in processSourceAsPublicType() 227 typeSideMap.put(source.getType(), getInsetSide(insets)); in processSourceAsPublicType() 236 private @InsetSide int getInsetSide(Insets insets) { in getInsetSide() argument [all …]
|
/frameworks/base/core/tests/coretests/src/android/view/ |
D | InsetsSourceTest.java | 56 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsTop() local 58 assertEquals(Insets.of(0, 100, 0, 0), insets); in testCalculateInsetsTop() 64 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsBottom() local 66 assertEquals(Insets.of(0, 0, 0, 100), insets); in testCalculateInsetsBottom() 72 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsLeft() local 74 assertEquals(Insets.of(100, 0, 0, 0), insets); in testCalculateInsetsLeft() 80 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsRight() local 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() local 90 assertEquals(Insets.of(0, 100, 0, 0), insets); in testCalculateInsets_overextend() [all …]
|
D | WindowInsetsTest.java | 64 WindowInsets insets = b.build(); in typeMap() local 65 assertEquals(300, insets.getSystemWindowInsets().bottom); in typeMap() 73 WindowInsets insets = b.build(); in compatInsets() local 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() 86 WindowInsets insets = b.build(); in visibility() local 87 assertTrue(insets.isVisible(sideBars())); in visibility() 88 assertTrue(insets.isVisible(sideBars() | ime())); in visibility() 89 assertFalse(insets.isVisible(sideBars() | topBar())); in visibility() 98 WindowInsets insets = b.build(); in consume_doesntChangeVisibility() local [all …]
|
D | InsetsStateTest.java | 73 WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), false, false, in testCalculateInsets() local 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() 92 WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), false, false, in testCalculateInsets_imeAndNav() local 94 assertEquals(100, insets.getStableInsetBottom()); in testCalculateInsets_imeAndNav() 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() [all …]
|
D | ViewRootImplTest.java | 60 final WindowInsets insets = mViewRootImpl.getWindowInsets(true /* forceConstruct */); in negativeInsets_areSetToZero() local 62 assertThat(insets.getSystemWindowInsets(), equalTo(Insets.NONE)); in negativeInsets_areSetToZero() 63 assertThat(insets.getStableInsets(), equalTo(Insets.NONE)); in negativeInsets_areSetToZero() 70 final WindowInsets insets = mViewRootImpl.getWindowInsets(true /* forceConstruct */); in negativeInsets_areSetToZero_positiveAreLeftAsIs() local 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() 80 final WindowInsets insets = mViewRootImpl.getWindowInsets(true /* forceConstruct */); in positiveInsets_areLeftAsIs() local 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()
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | TaskSnapshotSurfaceTest.java | 168 final Rect insets = new Rect(0, 10, 0, 10); in testCalculateSnapshotFrame() local 169 mSurface.setFrames(new Rect(0, 0, 100, 100), insets, insets); in testCalculateSnapshotFrame() 177 final Rect insets = new Rect(10, 10, 0, 0); in testCalculateSnapshotFrame_navBarLeft() local 178 mSurface.setFrames(new Rect(0, 0, 100, 100), insets, insets); in testCalculateSnapshotFrame_navBarLeft() 186 final Rect insets = new Rect(0, 10, 10, 0); in testDrawStatusBarBackground() local 187 mSurface.setFrames(new Rect(0, 0, 100, 100), insets, insets); in testDrawStatusBarBackground() 199 final Rect insets = new Rect(0, 10, 10, 0); in testDrawStatusBarBackground_nullFrame() local 200 mSurface.setFrames(new Rect(0, 0, 100, 100), insets, insets); in testDrawStatusBarBackground_nullFrame() 212 final Rect insets = new Rect(0, 10, 10, 0); in testDrawStatusBarBackground_nope() local 213 mSurface.setFrames(new Rect(0, 0, 100, 100), insets, insets); in testDrawStatusBarBackground_nope() [all …]
|
D | ScreenDecorWindowTests.java | 275 final WindowInsets insets = getInsets(activity); in assertInsetGreaterOrEqual() local 278 assertThat(insets.getSystemWindowInsetTop()).isAtLeast(expected); in assertInsetGreaterOrEqual() 281 assertThat(insets.getSystemWindowInsetBottom()).isAtLeast(expected); in assertInsetGreaterOrEqual() 284 assertThat(insets.getSystemWindowInsetLeft()).isAtLeast(expected); in assertInsetGreaterOrEqual() 287 assertThat(insets.getSystemWindowInsetRight()).isAtLeast(expected); in assertInsetGreaterOrEqual() 294 final WindowInsets insets = getInsets(activity); in waitForInsetGreaterOrEqual() local 296 case TOP: return insets.getSystemWindowInsetTop() >= expected; in waitForInsetGreaterOrEqual() 297 case BOTTOM: return insets.getSystemWindowInsetBottom() >= expected; in waitForInsetGreaterOrEqual() 298 case LEFT: return insets.getSystemWindowInsetLeft() >= expected; in waitForInsetGreaterOrEqual() 299 case RIGHT: return insets.getSystemWindowInsetRight() >= expected; in waitForInsetGreaterOrEqual()
|
D | DisplayPolicyInsetsTests.java | 132 private void verifyConsistency(String what, DisplayInfo di, Rect insets, int width, in verifyConsistency() argument 135 equalTo(di.logicalWidth - insets.left - insets.right)); in verifyConsistency() 137 equalTo(di.logicalHeight - insets.top - insets.bottom)); in verifyConsistency()
|
/frameworks/base/packages/EasterEgg/src/com/android/egg/paint/ |
D | ToolbarView.kt | 50 override fun onApplyWindowInsets(insets: WindowInsets?): WindowInsets { in onApplyWindowInsets() 52 if (lp != null && insets != null) { in onApplyWindowInsets() 53 if (insets.hasStableInsets()) { in onApplyWindowInsets() 54 lp.topMargin = insets.stableInsetTop in onApplyWindowInsets() 55 lp.bottomMargin = insets.stableInsetBottom in onApplyWindowInsets() 57 lp.topMargin = insets.systemWindowInsetTop in onApplyWindowInsets() 58 lp.bottomMargin = insets.systemWindowInsetBottom in onApplyWindowInsets() 63 return super.onApplyWindowInsets(insets) in onApplyWindowInsets()
|
D | CutoutAvoidingToolbar.kt | 46 override fun onApplyWindowInsets(insets: WindowInsets?): WindowInsets { in onApplyWindowInsets() 47 _insets = insets in onApplyWindowInsets() 49 return super.onApplyWindowInsets(insets) in onApplyWindowInsets()
|
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/view/ |
D | StickyHeaderScrollView.java | 106 public WindowInsets onApplyWindowInsets(WindowInsets insets) { in onApplyWindowInsets() argument 108 statusBarInset = insets.getSystemWindowInsetTop(); in onApplyWindowInsets() 109 insets = in onApplyWindowInsets() 110 insets.replaceSystemWindowInsets( in onApplyWindowInsets() 111 insets.getSystemWindowInsetLeft(), in onApplyWindowInsets() 113 insets.getSystemWindowInsetRight(), in onApplyWindowInsets() 114 insets.getSystemWindowInsetBottom()); in onApplyWindowInsets() 116 return insets; in onApplyWindowInsets()
|
D | StickyHeaderListView.java | 141 public WindowInsets onApplyWindowInsets(WindowInsets insets) { in onApplyWindowInsets() argument 143 statusBarInset = insets.getSystemWindowInsetTop(); in onApplyWindowInsets() 144 insets.replaceSystemWindowInsets( in onApplyWindowInsets() 145 insets.getSystemWindowInsetLeft(), in onApplyWindowInsets() 147 insets.getSystemWindowInsetRight(), in onApplyWindowInsets() 148 insets.getSystemWindowInsetBottom()); in onApplyWindowInsets() 150 return insets; in onApplyWindowInsets()
|
/frameworks/base/tests/WallpaperTest/src/com/example/wallpapertest/ |
D | TestWallpaper.java | 165 public void onApplyWindowInsets(WindowInsets insets) { in onApplyWindowInsets() argument 166 super.onApplyWindowInsets(insets); in onApplyWindowInsets() 167 mMainInsets.set(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), in onApplyWindowInsets() 168 insets.getSystemWindowInsetRight(), insets.getSystemWindowInsetBottom()); in onApplyWindowInsets() 169 mStableInsets.set(insets.getStableInsetLeft(), insets.getStableInsetTop(), in onApplyWindowInsets() 170 insets.getStableInsetRight(), insets.getStableInsetBottom()); in onApplyWindowInsets() 171 mRound = insets.isRound(); in onApplyWindowInsets()
|
/frameworks/opt/setupwizard/library/recyclerview/src/com/android/setupwizardlib/view/ |
D | StickyHeaderRecyclerView.java | 124 public WindowInsets onApplyWindowInsets(WindowInsets insets) { in onApplyWindowInsets() argument 126 statusBarInset = insets.getSystemWindowInsetTop(); in onApplyWindowInsets() 127 insets.replaceSystemWindowInsets( in onApplyWindowInsets() 128 insets.getSystemWindowInsetLeft(), in onApplyWindowInsets() 130 insets.getSystemWindowInsetRight(), in onApplyWindowInsets() 131 insets.getSystemWindowInsetBottom()); in onApplyWindowInsets() 133 return insets; in onApplyWindowInsets()
|
/frameworks/base/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/ |
D | DockState.java | 91 public boolean acceptsDrop(int x, int y, int width, int height, Rect insets, in acceptsDrop() argument 98 updateBoundsWithSystemInsets(mTmpRect, insets); in acceptsDrop() 278 public Rect getPreDockedBounds(int width, int height, Rect insets) { in getPreDockedBounds() argument 280 return updateBoundsWithSystemInsets(mTmpRect, insets); in getPreDockedBounds() 287 public Rect getDockedBounds(int width, int height, int dividerSize, Rect insets, in getDockedBounds() argument 293 insets, width, height, dividerSize); in getDockedBounds() 305 int dividerSize, Rect insets, TaskStackLayoutAlgorithm layoutAlgorithm, in getDockedTaskStackBounds() argument 311 insets, width, height, dividerSize); in getDockedTaskStackBounds() 322 : insets.top; in getDockedTaskStackBounds() 325 layoutAlgorithm.getTaskStackBounds(displayRect, windowRectOut, top, 0, insets.right, in getDockedTaskStackBounds() [all …]
|
/frameworks/base/core/java/com/android/internal/policy/ |
D | DockedDividerUtils.java | 99 public static int calculateMiddlePosition(boolean isHorizontalDivision, Rect insets, in calculateMiddlePosition() argument 101 int start = isHorizontalDivision ? insets.top : insets.left; in calculateMiddlePosition() 103 ? displayHeight - insets.bottom in calculateMiddlePosition() 104 : displayWidth - insets.right; in calculateMiddlePosition()
|
D | DecorView.java | 1022 public WindowInsets onApplyWindowInsets(WindowInsets insets) { in onApplyWindowInsets() argument 1031 mFloatingInsets.top = insets.getSystemWindowInsetTop(); in onApplyWindowInsets() 1032 mFloatingInsets.bottom = insets.getSystemWindowInsetBottom(); in onApplyWindowInsets() 1033 insets = insets.inset(0, insets.getSystemWindowInsetTop(), in onApplyWindowInsets() 1034 0, insets.getSystemWindowInsetBottom()); in onApplyWindowInsets() 1037 mFloatingInsets.left = insets.getSystemWindowInsetTop(); in onApplyWindowInsets() 1038 mFloatingInsets.right = insets.getSystemWindowInsetBottom(); in onApplyWindowInsets() 1039 insets = insets.inset(insets.getSystemWindowInsetLeft(), 0, in onApplyWindowInsets() 1040 insets.getSystemWindowInsetRight(), 0); in onApplyWindowInsets() 1043 mFrameOffsets.set(insets.getSystemWindowInsetsAsRect()); in onApplyWindowInsets() [all …]
|
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/util/ |
D | SystemBarHelper.java | 326 public WindowInsets onApplyWindowInsets(View view, WindowInsets insets) { in onApplyWindowInsets() argument 332 int bottomInset = insets.getSystemWindowInsetBottom(); in onApplyWindowInsets() 334 final int bottomMargin = Math.max(insets.getSystemWindowInsetBottom() - bottomOffset, 0); in onApplyWindowInsets() 345 return insets.replaceSystemWindowInsets( in onApplyWindowInsets() 346 insets.getSystemWindowInsetLeft(), in onApplyWindowInsets() 347 insets.getSystemWindowInsetTop(), in onApplyWindowInsets() 348 insets.getSystemWindowInsetRight(), in onApplyWindowInsets()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | KeyguardPreviewContainer.java | 65 public WindowInsets onApplyWindowInsets(WindowInsets insets) { in onApplyWindowInsets() argument 66 setPadding(0, 0, 0, insets.getStableInsetBottom()); in onApplyWindowInsets() 67 return super.onApplyWindowInsets(insets); in onApplyWindowInsets()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/animation/ |
D | StackAnimationController.java | 439 final WindowInsets insets = mLayout.getRootWindowInsets(); 441 if (insets != null) { 445 insets.getSystemWindowInsetLeft(), 446 insets.getDisplayCutout() != null 447 ? insets.getDisplayCutout().getSafeInsetLeft() 454 insets.getSystemWindowInsetRight(), 455 insets.getDisplayCutout() != null 456 ? insets.getDisplayCutout().getSafeInsetRight() 463 insets.getDisplayCutout() != null 464 ? insets.getDisplayCutout().getSafeInsetTop() [all …]
|
/frameworks/base/graphics/java/android/graphics/ |
D | Insets.java | 145 Insets insets = (Insets) o; in equals() 147 if (bottom != insets.bottom) return false; in equals() 148 if (left != insets.left) return false; in equals() 149 if (right != insets.right) return false; in equals() 150 if (top != insets.top) return false; in equals()
|
D | Rect.java | 427 public void inset(@NonNull Rect insets) { in inset() argument 428 left += insets.left; in inset() 429 top += insets.top; in inset() 430 right -= insets.right; in inset() 431 bottom -= insets.bottom; in inset() 439 public void inset(Insets insets) { in inset() argument 440 left += insets.left; in inset() 441 top += insets.top; in inset() 442 right -= insets.right; in inset() 443 bottom -= insets.bottom; in inset()
|
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/ |
D | ThumbnailData.java | 34 public Rect insets; field in ThumbnailData 45 insets = new Rect(); in ThumbnailData() 56 insets = new Rect(snapshot.getContentInsets()); in ThumbnailData()
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | ActionBarOverlayLayout.java | 291 private boolean applyInsets(View view, Rect insets, boolean left, boolean top, 295 if (left && lp.leftMargin != insets.left) { 297 lp.leftMargin = insets.left; 299 if (top && lp.topMargin != insets.top) { 301 lp.topMargin = insets.top; 303 if (right && lp.rightMargin != insets.right) { 305 lp.rightMargin = insets.right; 307 if (bottom && lp.bottomMargin != insets.bottom) { 309 lp.bottomMargin = insets.bottom; 315 public WindowInsets onApplyWindowInsets(WindowInsets insets) { [all …]
|