/frameworks/base/core/tests/coretests/src/android/view/ |
D | InsetsSourceTest.java | 62 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsTop() local 64 assertEquals(Insets.of(0, 100, 0, 0), insets); in testCalculateInsetsTop() 70 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsBottom() local 72 assertEquals(Insets.of(0, 0, 0, 100), insets); in testCalculateInsetsBottom() 78 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsLeft() local 80 assertEquals(Insets.of(100, 0, 0, 0), insets); in testCalculateInsetsLeft() 86 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsRight() local 88 assertEquals(Insets.of(0, 0, 100, 0), insets); in testCalculateInsetsRight() 94 Insets insets = mSource.calculateInsets(new Rect(100, 0, 500, 500), in testCalculateInsets_overextend() local 96 assertEquals(Insets.of(0, 100, 0, 0), insets); in testCalculateInsets_overextend() [all …]
|
D | InsetsStateTest.java | 89 WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, in testCalculateInsets() local 92 assertEquals(Insets.of(0, 100, 0, 100), insets.getSystemWindowInsets()); in testCalculateInsets() 93 assertEquals(Insets.of(0, 100, 0, 100), insets.getInsets(Type.all())); in testCalculateInsets() 96 assertEquals(Insets.of(0, 100, 0, 0), insets.getInsets(statusBars())); in testCalculateInsets() 97 assertEquals(Insets.of(0, 0, 0, 100), insets.getInsets(ime())); in testCalculateInsets() 106 WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, in testCalculateInsets_imeAndNav() local 109 assertEquals(100, insets.getStableInsetBottom()); in testCalculateInsets_imeAndNav() 110 assertEquals(Insets.of(0, 0, 0, 100), insets.getInsetsIgnoringVisibility(systemBars())); in testCalculateInsets_imeAndNav() 111 assertEquals(Insets.of(0, 0, 0, 200), insets.getSystemWindowInsets()); in testCalculateInsets_imeAndNav() 112 assertEquals(Insets.of(0, 0, 0, 200), insets.getInsets(Type.all())); in testCalculateInsets_imeAndNav() [all …]
|
/frameworks/base/core/java/android/view/ |
D | WindowInsets.java | 217 Insets insets = typeInsetsMap[indexOf(i)]; in getInsets() local 218 if (insets == null) { in getInsets() 222 result = insets; in getInsets() 224 result = Insets.max(result, insets); in getInsets() 233 private static void setInsets(Insets[] typeInsetsMap, @InsetsType int typeMask, Insets insets) { in setInsets() argument 238 typeInsetsMap[indexOf(i)] = insets; in setInsets() 254 private static Insets[] createCompatTypeMap(@Nullable Rect insets) { in createCompatTypeMap() argument 255 if (insets == null) { in createCompatTypeMap() 259 assignCompatInsets(typeInsetsMap, insets); in createCompatTypeMap() 267 public static void assignCompatInsets(Insets[] typeInsetsMap, Rect insets) { in assignCompatInsets() argument [all …]
|
D | WindowInsetsAnimation.java | 256 public Bounds inset(@NonNull Insets insets) { in inset() argument 261 mLowerBound, insets.left, insets.top, insets.right, insets.bottom), in inset() 263 mUpperBound, insets.left, insets.top, insets.right, insets.bottom)); in inset() 429 public abstract WindowInsets onProgress(@NonNull WindowInsets insets, in onProgress() argument
|
D | InsetsState.java | 305 final Insets insets = source.calculateInsets(roundedCornerFrame, false); in calculateRelativeRoundedCorners() local 306 roundedCornerFrame.inset(insets); in calculateRelativeRoundedCorners() 337 Insets insets = Insets.NONE; in calculateInsets() local 347 insets = Insets.max(source.calculateInsets(frame, ignoreVisibility), insets); in calculateInsets() 349 return insets; in calculateInsets() 354 Insets insets = Insets.NONE; in calculateInsets() local 367 insets = Insets.max(source.calculateInsets(frame, true), insets); in calculateInsets() 369 return insets; in calculateInsets() 381 Insets insets = Insets.NONE; in calculateVisibleInsets() local 391 insets = Insets.max(source.calculateVisibleInsets(frame), insets); in calculateVisibleInsets() [all …]
|
D | InsetsAnimationControlImpl.java | 231 public void setInsetsAndAlpha(Insets insets, float alpha, float fraction) { in setInsetsAndAlpha() argument 232 setInsetsAndAlpha(insets, alpha, fraction, false /* allowWhenFinished */); in setInsetsAndAlpha() 235 private void setInsetsAndAlpha(Insets insets, float alpha, float fraction, in setInsetsAndAlpha() argument 246 mPendingInsets = sanitize(insets); in setInsetsAndAlpha() 397 Insets insets = Insets.NONE; in calculateInsets() local 399 return insets; in calculateInsets() 408 insets = Insets.max(insets, control.getInsetsHint()); in calculateInsets() 411 return insets; in calculateInsets() 414 private Insets sanitize(Insets insets) { in sanitize() argument 415 if (insets == null) { in sanitize() [all …]
|
/frameworks/base/core/java/android/util/ |
D | RotationUtils.java | 43 public static Insets rotateInsets(Insets insets, @Rotation int rotation) { in rotateInsets() argument 44 if (insets == null || insets == Insets.NONE) { in rotateInsets() 45 return insets; in rotateInsets() 50 rotated = insets; in rotateInsets() 54 insets.top, in rotateInsets() 55 insets.right, in rotateInsets() 56 insets.bottom, in rotateInsets() 57 insets.left); in rotateInsets() 61 insets.right, in rotateInsets() 62 insets.bottom, in rotateInsets() [all …]
|
/frameworks/base/packages/EasterEgg/src/com/android/egg/paint/ |
D | ToolbarView.kt | 51 override fun onApplyWindowInsets(insets: WindowInsets?): WindowInsets { in onApplyWindowInsets() 53 if (lp != null && insets != null) { in onApplyWindowInsets() 54 if (insets.hasStableInsets()) { in onApplyWindowInsets() 55 lp.topMargin = insets.stableInsetTop in onApplyWindowInsets() 56 lp.bottomMargin = insets.stableInsetBottom in onApplyWindowInsets() 58 lp.topMargin = insets.systemWindowInsetTop in onApplyWindowInsets() 59 lp.bottomMargin = insets.systemWindowInsetBottom in onApplyWindowInsets() 64 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/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/startingsurface/ |
D | TaskSnapshotWindowTest.java | 196 final Rect insets = new Rect(0, 10, 0, 10); in testCalculateSnapshotFrame() local 197 mWindow.setFrames(new Rect(0, 0, 100, 100), insets); in testCalculateSnapshotFrame() 205 final Rect insets = new Rect(10, 10, 0, 0); in testCalculateSnapshotFrame_navBarLeft() local 206 mWindow.setFrames(new Rect(0, 0, 100, 100), insets); in testCalculateSnapshotFrame_navBarLeft() 214 final Rect insets = new Rect(0, 10, 0, 10); in testCalculateSnapshotFrame_waterfall() local 215 mWindow.setFrames(new Rect(5, 0, 95, 100), insets); in testCalculateSnapshotFrame_waterfall() 223 final Rect insets = new Rect(0, 10, 10, 0); in testDrawStatusBarBackground() local 224 mWindow.setFrames(new Rect(0, 0, 100, 100), insets); in testDrawStatusBarBackground() 235 final Rect insets = new Rect(0, 10, 10, 0); in testDrawStatusBarBackground_nullFrame() local 236 mWindow.setFrames(new Rect(0, 0, 100, 100), insets); in testDrawStatusBarBackground_nullFrame() [all …]
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/ |
D | PipSurfaceTransactionHelper.java | 111 Rect sourceBounds, Rect destinationBounds, Rect insets, in scaleAndCrop() argument 117 mTmpDestinationRect.inset(insets); in scaleAndCrop() 135 final float left = destinationBounds.left - insets.left * scale; in scaleAndCrop() 136 final float top = destinationBounds.top - insets.top * scale; in scaleAndCrop() 150 SurfaceControl leash, Rect sourceBounds, Rect destinationBounds, Rect insets, in rotateAndScaleWithCrop() argument 154 mTmpDestinationRect.inset(insets); in rotateAndScaleWithCrop() 167 crop.offset(insets.left, insets.top); in rotateAndScaleWithCrop() 170 positionX -= insets.left * scale; in rotateAndScaleWithCrop() 171 positionY -= insets.top * scale; in rotateAndScaleWithCrop() 175 positionX -= insets.top * scale; in rotateAndScaleWithCrop() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/controls/ui/ |
D | DetailDialog.kt | 176 v: View, insets: WindowInsets -> in <lambda>() method 179 val insets = insets.getInsets(Type.systemBars()) in <lambda>() constant 180 v.setPadding(l, insets.top, r, insets.bottom) in <lambda>() 199 val insets = metricInsets.getInsetsIgnoringVisibility(Type.systemBars() in <lambda>() constant 204 val finalRect = Rect(rect.left - insets.left /* left */, in <lambda>() 205 rect.top + insets.top + headerHeight /* top */, in <lambda>() 206 rect.right - insets.right /* right */, in <lambda>() 207 rect.bottom - insets.bottom /* bottom */) in <lambda>()
|
/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/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/base/packages/SystemUI/tests/src/com/android/systemui/shade/ |
D | NotificationQSContainerControllerTest.kt | 142 insets = windowInsets().withStableBottom()) in testTaskbarVisibleInSplitShade() 149 insets = windowInsets().withStableBottom()) in testTaskbarVisibleInSplitShade() 162 insets = windowInsets().withStableBottom()) in testTaskbarNotVisibleInSplitShade() 168 insets = windowInsets().withStableBottom()) in testTaskbarNotVisibleInSplitShade() 180 insets = windowInsets().withCutout()) in testTaskbarNotVisibleInSplitShadeWithCutout() 186 insets = windowInsets().withCutout().withStableBottom()) in testTaskbarNotVisibleInSplitShadeWithCutout() 198 insets = windowInsets().withStableBottom()) in testTaskbarVisibleInSinglePaneShade() 204 insets = windowInsets().withStableBottom()) in testTaskbarVisibleInSinglePaneShade() 215 insets = emptyInsets()) in testTaskbarNotVisibleInSinglePaneShade() 220 insets = windowInsets().withCutout().withStableBottom()) in testTaskbarNotVisibleInSinglePaneShade() [all …]
|
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/pip/ |
D | PipSurfaceTransactionHelper.java | 83 Rect sourceRectHint, Rect sourceBounds, Rect destinationBounds, Rect insets, in scaleAndCrop() argument 87 mTmpDestinationRect.inset(insets); in scaleAndCrop() 104 final float left = destinationBounds.left - (insets.left + sourceBounds.left) * scale; in scaleAndCrop() 105 final float top = destinationBounds.top - (insets.top + sourceBounds.top) * scale; in scaleAndCrop() 119 Rect sourceBounds, Rect destinationBounds, Rect insets, in scaleAndRotate() argument 123 mTmpDestinationRect.inset(insets); in scaleAndRotate() 135 adjustedPositionX = positionX + insets.top * scale; in scaleAndRotate() 136 adjustedPositionY = positionY + insets.left * scale; in scaleAndRotate() 138 adjustedPositionX = positionX - insets.top * scale; in scaleAndRotate() 139 adjustedPositionY = positionY - insets.left * scale; in scaleAndRotate()
|
/frameworks/base/core/java/com/android/internal/policy/ |
D | SystemBarUtils.java | 62 Insets insets = cutout == null ? Insets.NONE : Insets.of(cutout.getSafeInsets()); in getStatusBarHeightForRotation() local 66 if (!insets.equals(Insets.NONE)) { in getStatusBarHeightForRotation() 67 insets = RotationUtils.rotateInsets( in getStatusBarHeightForRotation() 68 insets, RotationUtils.deltaRotation(rotation, targetRot)); in getStatusBarHeightForRotation() 79 return Math.max(insets.top, defaultSize + waterfallInsets.top); in getStatusBarHeightForRotation()
|
D | DockedDividerUtils.java | 100 public static int calculateMiddlePosition(boolean isHorizontalDivision, Rect insets, in calculateMiddlePosition() argument 102 int start = isHorizontalDivision ? insets.top : insets.left; in calculateMiddlePosition() 104 ? displayHeight - insets.bottom in calculateMiddlePosition() 105 : displayWidth - insets.right; in calculateMiddlePosition()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/ |
D | PhonePipKeepClearAlgorithm.java | 61 Rect insets = new Rect(); in adjust() local 62 pipBoundsAlgorithm.getInsetBounds(insets); in adjust() 64 insets.bottom -= pipBoundsState.getImeHeight(); in adjust() 81 insets.bottom - pipBounds.height()); in adjust() 84 pipBounds.offsetTo(insets.right - pipBounds.width(), pipBounds.top); in adjust() 86 pipBounds.offsetTo(insets.left, pipBounds.top); in adjust() 91 pipBoundsState.getUnrestrictedKeepClearAreas(), insets); in adjust()
|
/frameworks/base/tests/WindowInsetsTests/src/com/google/android/test/windowinsetstests/ |
D | ChatActivity.java | 157 public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) { in onCreate() 158 mRoot.setPadding(insets.getSystemWindowInsetLeft(), in onCreate() 159 insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), in onCreate() 160 insets.getSystemWindowInsetBottom()); in onCreate() 173 public WindowInsets onProgress(WindowInsets insets, in onCreate() 175 mTransitions.forEach(it -> it.onProgress(insets)); in onCreate() 176 return insets; in onCreate() 251 void onProgress(WindowInsets insets) { in onProgress() argument
|
D | ControllerActivity.java | 134 public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) { in onApplyWindowInsets() argument 136 updateWidgets(insets, Type.statusBars(), mToggleStatus, mSeekStatus); in onApplyWindowInsets() 137 updateWidgets(insets, Type.navigationBars(), mToggleNavigation, mSeekNavigation); in onApplyWindowInsets() 138 updateWidgets(insets, Type.ime(), mToggleIme, mSeekIme); in onApplyWindowInsets() 139 mLastInsets = insets; in onApplyWindowInsets() 143 final Insets gestureInsets = insets.getInsets(Type.systemGestures()); in onApplyWindowInsets() 146 return v.onApplyWindowInsets(insets); in onApplyWindowInsets() 149 private void updateWidgets(WindowInsets insets, int types, ToggleButton toggle, SeekBar seek) { in updateWidgets() argument 150 final boolean isVisible = insets.isVisible(types); in updateWidgets()
|
/frameworks/base/tests/HandwritingIme/src/com/google/android/test/handwritingime/ |
D | InkView.java | 62 Insets insets = metrics.getWindowInsets() in InkView() local 65 metrics.getBounds().width() - insets.left - insets.right, in InkView() 66 metrics.getBounds().height() - insets.top - insets.bottom)); in InkView() 67 mTopInset = insets.top; in InkView()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/screenshot/ |
D | ScreenshotDataTest.kt | 34 private val insets = Insets.of(1, 2, 3, 4) constant in com.android.systemui.screenshot.ScreenshotDataTest 42 .setInsets(insets) in testConstruction() 53 assertThat(data.insets).isEqualTo(insets) in testConstruction()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
D | NotificationInsetsImpl.java | 45 final Insets insets = windowInsets.getInsetsIgnoringVisibility(systemBars()); in getinsets() local 53 leftInset = Math.max(insets.left, leftInset); in getinsets() 54 rightInset = Math.max(insets.right, rightInset); in getinsets()
|