Home
last modified time | relevance | path

Searched refs:insets (Results 1 – 25 of 149) sorted by relevance

123456

/aosp14/frameworks/base/core/tests/coretests/src/android/view/
H A DInsetsSourceTest.java69 assertEquals(Insets.of(0, 100, 0, 0), insets); in testCalculateInsetsTop()
77 assertEquals(Insets.of(0, 0, 0, 100), insets); in testCalculateInsetsBottom()
85 assertEquals(Insets.of(100, 0, 0, 0), insets); in testCalculateInsetsLeft()
93 assertEquals(Insets.of(0, 0, 100, 0), insets); in testCalculateInsetsRight()
101 assertEquals(Insets.of(0, 100, 0, 0), insets); in testCalculateInsets_overextend()
109 assertEquals(Insets.of(0, 0, 0, 100), insets); in testCalculateInsets_ime_leftCutout()
129 assertEquals(Insets.of(0, 0, 0, 0), insets); in testCalculateInsets_invisible()
152 assertEquals(Insets.NONE, insets); in testCalculateInsets_noIntersection_vertical()
173 assertEquals(Insets.NONE, insets); in testCalculateInsets_noIntersection_horizontal()
180 assertEquals(Insets.NONE, insets); in testCalculateInsetsForIme_noIntersection_horizontal()
[all …]
H A DInsetsStateTest.java126 assertEquals(100, insets.getStableInsetBottom()); in testCalculateInsets_imeAndNav()
176 assertEquals(100, insets.getInsets(ime()).bottom); in testCalculateInsets_imeIgnoredWithoutAdjustResize()
177 assertTrue(insets.isVisible(ime())); in testCalculateInsets_imeIgnoredWithoutAdjustResize()
191 assertEquals(100, insets.getSystemWindowInsetTop()); in testCalculateInsets_systemUiFlagLayoutStable()
195 assertEquals(0, insets.getSystemWindowInsetTop()); in testCalculateInsets_systemUiFlagLayoutStable()
206 assertEquals(0, insets.getSystemWindowInsetTop()); in testCalculateInsets_systemUiFlagLayoutStable_windowFlagFullscreen()
210 assertEquals(0, insets.getSystemWindowInsetTop()); in testCalculateInsets_systemUiFlagLayoutStable_windowFlagFullscreen()
222 assertEquals(0, insets.getSystemWindowInsetTop()); in testCalculateInsets_flagLayoutNoLimits()
226 assertEquals(100, insets.getSystemWindowInsetTop()); in testCalculateInsets_flagLayoutNoLimits()
230 assertEquals(100, insets.getSystemWindowInsetTop()); in testCalculateInsets_flagLayoutNoLimits()
[all …]
/aosp14/frameworks/base/core/java/android/view/
H A DWindowInsets.java206 if (insets == null) { in getInsets()
210 result = insets; in getInsets()
246 if (insets == null) { in createCompatTypeMap()
261 Insets.of(insets.left, 0, insets.right, insets.bottom); in assignCompatInsets()
296 mTempRect.set(insets.left, insets.top, insets.right, insets.bottom); in getSystemWindowInsetsAsRect()
977 Objects.requireNonNull(insets); in inset()
978 return inset(insets.left, insets.top, insets.right, insets.bottom); in inset()
1085 if (insets == null) { in insetInsets()
1089 if (insetInsets != insets) { in insetInsets()
1106 return insets; in insetInsets()
[all …]
H A DWindowInsetsAnimation.java256 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
H A DInsetsState.java279 insets = Insets.max(source.calculateInsets(frame, ignoreVisibility), insets); in calculateInsets()
281 return insets; in calculateInsets()
292 insets = Insets.max(source.calculateInsets(frame, true), insets); in calculateInsets()
294 return insets; in calculateInsets()
313 insets = Insets.max(source.calculateVisibleInsets(frame), insets); in calculateVisibleInsets()
317 : insets; in calculateVisibleInsets()
344 return insets.left == sourceWidth || insets.right == sourceWidth in canControlSource()
345 || insets.top == sourceHeight || insets.bottom == sourceHeight; in canControlSource()
355 insets, type); in processSource()
416 if (insets.left != 0) { in getInsetSide()
[all …]
H A DEventLogTags.logtags42 …m_start (token|3),(animation type|1),(alpha|5),(current insets|3),(shown insets|3),(hidden insets|…
44 32007 imf_ime_anim_finish (token|3),(animation type|1),(alpha|5),(shown|1),(insets|3)
46 32008 imf_ime_anim_cancel (token|3),(animation type|1),(pending insets|3)
48 …|3),(displayId|1),(direction|1),(alpha|5),(startY|5),(endY|5),(leash|3),(insets|3),(surface positi…
50 32010 imf_ime_remote_anim_end (token|3),(displayId|1),(direction|1),(endY|5),(leash|3),(insets|3),(…
52 32011 imf_ime_remote_anim_cancel (token|3),(displayId|1),(insets|3)
H A DInsetsAnimationControlImpl.java268 mPendingInsets = sanitize(insets); in setInsetsAndAlpha()
330 final Insets insets = shown ? mShownInsets : mHiddenInsets; in finish() local
427 Insets insets = Insets.NONE; in calculateInsets() local
429 return insets; in calculateInsets()
439 insets = Insets.max(insets, control.getInsetsHint()); in calculateInsets()
442 return insets; in calculateInsets()
445 private Insets sanitize(Insets insets) { in sanitize() argument
446 if (insets == null) { in sanitize()
447 insets = getCurrentInsets(); in sanitize()
450 return insets; in sanitize()
[all …]
/aosp14/frameworks/base/core/java/android/util/
H A DRotationUtils.java45 if (insets == null || insets == Insets.NONE) { in rotateInsets()
46 return insets; in rotateInsets()
51 rotated = insets; in rotateInsets()
55 insets.top, in rotateInsets()
56 insets.right, in rotateInsets()
58 insets.left); in rotateInsets()
62 insets.right, in rotateInsets()
64 insets.left, in rotateInsets()
65 insets.top); in rotateInsets()
70 insets.left, in rotateInsets()
[all …]
/aosp14/frameworks/base/packages/EasterEgg/src/com/android/egg/paint/
H A DToolbarView.kt51 override fun onApplyWindowInsets(insets: WindowInsets?): WindowInsets {
53 if (lp != null && insets != null) {
54 if (insets.hasStableInsets()) {
55 lp.topMargin = insets.stableInsetTop
56 lp.bottomMargin = insets.stableInsetBottom
58 lp.topMargin = insets.systemWindowInsetTop
59 lp.bottomMargin = insets.systemWindowInsetBottom
64 return super.onApplyWindowInsets(insets)
/aosp14/frameworks/base/core/tests/coretests/src/android/window/
H A DSnapshotDrawerUtilsTest.java202 final Rect insets = new Rect(0, 10, 0, 10); in testCalculateSnapshotFrame() local
203 mSnapshotSurface.setFrames(new Rect(0, 0, 100, 100), insets); in testCalculateSnapshotFrame()
211 final Rect insets = new Rect(10, 10, 0, 0); in testCalculateSnapshotFrame_navBarLeft() local
220 final Rect insets = new Rect(0, 10, 0, 10); in testCalculateSnapshotFrame_waterfall() local
221 mSnapshotSurface.setFrames(new Rect(5, 0, 95, 100), insets); in testCalculateSnapshotFrame_waterfall()
229 final Rect insets = new Rect(0, 10, 10, 0); in testDrawStatusBarBackground() local
241 final Rect insets = new Rect(0, 10, 10, 0); in testDrawStatusBarBackground_nullFrame() local
253 final Rect insets = new Rect(0, 10, 10, 0); in testDrawStatusBarBackground_nope() local
264 final Rect insets = new Rect(0, 10, 0, 10); in testDrawNavigationBarBackground() local
277 final Rect insets = new Rect(10, 10, 0, 0); in testDrawNavigationBarBackground_left() local
[all …]
/aosp14/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/
H A DPipSurfaceTransactionHelper.java111 Rect sourceBounds, Rect destinationBounds, Rect insets, in scaleAndCrop() argument
117 mTmpDestinationRect.inset(insets); in scaleAndCrop()
136 final float top = destinationBounds.top - insets.top * scale; in scaleAndCrop()
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()
176 positionY += insets.left * scale; in rotateAndScaleWithCrop()
178 positionX += insets.top * scale; in rotateAndScaleWithCrop()
[all …]
/aosp14/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/
H A DPhonePipKeepClearAlgorithm.java60 Rect insets = new Rect(); in adjust() local
61 pipBoundsAlgorithm.getInsetBounds(insets); in adjust()
63 insets.bottom -= (pipBoundsState.getImeHeight() + mImeOffset); in adjust()
68 if (startingBounds.bottom > insets.bottom || startingBounds.top < insets.top) { in adjust()
70 startingBounds.offset(0, insets.bottom - startingBounds.bottom); in adjust()
78 if (!insets.contains(pipBounds)) { in adjust()
98 insets.bottom - pipBounds.height()); in adjust()
101 pipBounds.offsetTo(insets.right - pipBounds.width(), pipBounds.top); in adjust()
103 pipBounds.offsetTo(insets.left, pipBounds.top); in adjust()
108 pipBoundsState.getUnrestrictedKeepClearAreas(), insets); in adjust()
H A DPipDisplayLayoutState.java85 Rect insets = getDisplayLayout().stableInsets(); in getInsetBounds() local
86 insetBounds.set(insets.left + getScreenEdgeInsets().x, in getInsetBounds()
87 insets.top + getScreenEdgeInsets().y, in getInsetBounds()
88 getDisplayLayout().width() - insets.right - getScreenEdgeInsets().x, in getInsetBounds()
89 getDisplayLayout().height() - insets.bottom - getScreenEdgeInsets().y); in getInsetBounds()
/aosp14/frameworks/base/graphics/java/android/view/
H A DPixelCopy.java260 final Rect insets = new Rect(); in request() local
261 final Surface surface = sourceForWindow(source, insets); in request()
304 return insets; in adjustSourceRectForInsets()
306 if (insets != null) { in adjustSourceRectForInsets()
307 srcRect.offset(insets.left, insets.top); in adjustSourceRectForInsets()
391 final Rect insets = new Rect(); in ofWindow() local
392 final Surface surface = sourceForWindow(source, insets); in ofWindow()
393 return new Builder(new Request(surface, insets)); in ofWindow()
415 final Rect insets = new Rect(); in ofWindow() local
420 insets.set(root.mWindowAttributes.surfaceInsets); in ofWindow()
[all …]
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/controls/ui/
H A DDetailDialog.kt186 v: View, insets: WindowInsets ->
189 val insets = insets.getInsets(Type.systemBars()) regex
190 v.setPadding(l, insets.top, r, insets.bottom)
209 val insets = metricInsets.getInsetsIgnoringVisibility(Type.systemBars() regex
214 val finalRect = Rect(rect.left - insets.left /* left */,
215 rect.top + insets.top + headerHeight /* top */,
216 rect.right - insets.right /* right */,
217 rect.bottom - insets.bottom /* bottom */)
/aosp14/frameworks/base/tests/WallpaperTest/src/com/example/wallpapertest/
H A DTestWallpaper.java165 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()
/aosp14/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/pip/
H A DPipSurfaceTransactionHelper.java83 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()
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shade/
H A DNotificationsQSContainerControllerTest.kt201 insets = windowInsets().withStableBottom()
212 insets = windowInsets().withStableBottom()
229 insets = windowInsets().withStableBottom()
239 insets = windowInsets().withStableBottom()
255 insets = windowInsets().withCutout()
281 insets = windowInsets().withStableBottom()
288 insets = windowInsets().withStableBottom()
313 insets = windowInsets().withStableBottom()
474 insets = emptyInsets(),
541 insets: WindowInsets,
[all …]
H A DNotificationsQSContainerControllerLegacyTest.kt202 insets = windowInsets().withStableBottom()
213 insets = windowInsets().withStableBottom()
230 insets = windowInsets().withStableBottom()
240 insets = windowInsets().withStableBottom()
256 insets = windowInsets().withCutout()
282 insets = windowInsets().withStableBottom()
289 insets = windowInsets().withStableBottom()
314 insets = windowInsets().withStableBottom()
491 insets = emptyInsets(),
558 insets: WindowInsets,
[all …]
/aosp14/frameworks/base/core/java/com/android/internal/policy/
H A DSystemBarUtils.java62 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()
/aosp14/frameworks/base/tests/WindowInsetsTests/src/com/google/android/test/windowinsetstests/
H A DControllerActivity.java95 public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) { in onApplyWindowInsets() argument
97 updateWidgets(insets, Type.statusBars(), mToggleStatus, mSeekStatus); in onApplyWindowInsets()
98 updateWidgets(insets, Type.navigationBars(), mToggleNavigation, mSeekNavigation); in onApplyWindowInsets()
99 updateWidgets(insets, Type.ime(), mToggleIme, mSeekIme); in onApplyWindowInsets()
100 mLastInsets = insets; in onApplyWindowInsets()
104 final Insets gestureInsets = insets.getInsets(Type.systemGestures()); in onApplyWindowInsets()
107 return v.onApplyWindowInsets(insets); in onApplyWindowInsets()
110 private void updateWidgets(WindowInsets insets, int types, ToggleButton toggle, SeekBar seek) { in updateWidgets() argument
111 final boolean isVisible = insets.isVisible(types); in updateWidgets()
H A DChatActivity.java157 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
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/
H A DMenuView.java176 final int[] insets = mMenuViewAppearance.getMenuInsets(); in onEdgeChanged() local
177 getContainerViewInsetLayer().setLayerInset(INDEX_MENU_ITEM, insets[0], insets[1], insets[2], in onEdgeChanged()
178 insets[3]); in onEdgeChanged()
343 final int[] insets = mMenuViewAppearance.getMenuMovingStateInsets(); in onDraggingStart() local
344 getContainerViewInsetLayer().setLayerInset(INDEX_MENU_ITEM, insets[0], insets[1], insets[2], in onDraggingStart()
345 insets[3]); in onDraggingStart()
/aosp14/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/
H A DDockedDividerUtils.java100 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()
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/screenshot/
H A DScreenshotDataTest.kt34 private val insets = Insets.of(1, 2, 3, 4) regex
42 .setInsets(insets)
53 assertThat(data.insets).isEqualTo(insets)

123456