Home
last modified time | relevance | path

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

12345678

/frameworks/base/core/tests/coretests/src/android/view/
DInsetsSourceTest.java71 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsTop() local
73 assertEquals(Insets.of(0, 100, 0, 0), insets); in testCalculateInsetsTop()
79 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsBottom() local
81 assertEquals(Insets.of(0, 0, 0, 100), insets); in testCalculateInsetsBottom()
87 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsLeft() local
89 assertEquals(Insets.of(100, 0, 0, 0), insets); in testCalculateInsetsLeft()
95 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsRight() local
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() local
105 assertEquals(Insets.of(0, 100, 0, 0), insets); in testCalculateInsets_overextend()
[all …]
DInsetsStateTest.java108 WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, in testCalculateInsets() local
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()
127 WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, in testCalculateInsets_imeAndNav() local
130 assertEquals(100, insets.getStableInsetBottom()); in testCalculateInsets_imeAndNav()
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()
[all …]
/frameworks/base/packages/EasterEgg/src/com/android/egg/paint/
DToolbarView.kt51 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/base/core/java/android/util/
DRotationUtils.java45 public static Insets rotateInsets(Insets insets, @Rotation int rotation) { in rotateInsets() argument
46 if (insets == null || insets == Insets.NONE) { in rotateInsets()
47 return insets; in rotateInsets()
52 rotated = insets; in rotateInsets()
56 insets.top, in rotateInsets()
57 insets.right, in rotateInsets()
58 insets.bottom, in rotateInsets()
59 insets.left); in rotateInsets()
63 insets.right, in rotateInsets()
64 insets.bottom, in rotateInsets()
[all …]
/frameworks/base/core/java/android/view/
DWindowInsets.java232 Insets insets = typeInsetsMap[indexOf(i)]; in getInsets() local
233 if (insets == null) { in getInsets()
237 result = insets; in getInsets()
239 result = Insets.max(result, insets); in getInsets()
248 private static void setInsets(Insets[] typeInsetsMap, @InsetsType int typeMask, Insets insets) { in setInsets() argument
253 typeInsetsMap[indexOf(i)] = insets; in setInsets()
273 public static Insets[] createCompatTypeMap(@Nullable Rect insets) { in createCompatTypeMap() argument
274 if (insets == null) { in createCompatTypeMap()
278 assignCompatInsets(typeInsetsMap, insets); in createCompatTypeMap()
286 public static void assignCompatInsets(Insets[] typeInsetsMap, Rect insets) { in assignCompatInsets() argument
[all …]
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
DInsetsState.java215 final Insets insets = source.calculateInsets(roundedCornerFrame, false); in calculateRelativeRoundedCorners() local
216 roundedCornerFrame.inset(insets); in calculateRelativeRoundedCorners()
257 Insets insets = Insets.NONE; in calculateInsets() local
263 insets = Insets.max(source.calculateInsets(frame, ignoreVisibility), insets); in calculateInsets()
265 return insets; in calculateInsets()
270 Insets insets = Insets.NONE; in calculateInsets() local
276 insets = Insets.max(source.calculateInsets(frame, true), insets); in calculateInsets()
278 return insets; in calculateInsets()
288 Insets insets = Insets.NONE; in calculateVisibleInsets() local
297 insets = Insets.max(source.calculateVisibleInsets(frame), insets); in calculateVisibleInsets()
[all …]
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)
/frameworks/proto_logging/stats/enums/view/inputmethod/
Denums.proto168 // Requested applying the IME visibility in the insets source consumer.
176 // The Window Manager has a connection to the IME insets control target.
178 // Reached the window insets control target's show insets method.
180 // Reached the window insets control target's hide insets method.
182 // Reached the remote insets control target's show insets method.
184 // Reached the remote insets control target's hide insets method.
186 // Reached the remote insets controller.
188 // Created the IME window insets show animation.
190 // Started the IME window insets show animation.
192 // Reached the client's show insets method.
[all …]
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/view/
DStickyHeaderScrollView.java106 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()
DStickyHeaderListView.java141 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/core/tests/coretests/src/android/window/
DSnapshotDrawerUtilsTest.java204 final Rect insets = new Rect(0, 10, 0, 10); in testCalculateSnapshotFrame() local
205 mSnapshotSurface.setFrames(new Rect(0, 0, 100, 100), insets); in testCalculateSnapshotFrame()
213 final Rect insets = new Rect(10, 10, 0, 0); in testCalculateSnapshotFrame_navBarLeft() local
214 mSnapshotSurface.setFrames(new Rect(0, 0, 100, 100), insets); in testCalculateSnapshotFrame_navBarLeft()
222 final Rect insets = new Rect(0, 10, 0, 10); in testCalculateSnapshotFrame_waterfall() local
223 mSnapshotSurface.setFrames(new Rect(5, 0, 95, 100), insets); in testCalculateSnapshotFrame_waterfall()
231 final Rect insets = new Rect(0, 10, 10, 0); in testDrawStatusBarBackground() local
232 mSnapshotSurface.setFrames(new Rect(0, 0, 100, 100), insets); in testDrawStatusBarBackground()
243 final Rect insets = new Rect(0, 10, 10, 0); in testDrawStatusBarBackground_nullFrame() local
244 mSnapshotSurface.setFrames(new Rect(0, 0, 100, 100), insets); in testDrawStatusBarBackground_nullFrame()
[all …]
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/
DPipSurfaceTransactionHelper.java131 Rect sourceBounds, Rect destinationBounds, Rect insets, in scaleAndCrop() argument
137 mTmpDestinationRect.inset(insets); in scaleAndCrop()
151 left = destinationBounds.left - insets.left * scale; in scaleAndCrop()
152 top = destinationBounds.top - insets.top * scale; in scaleAndCrop()
157 left = scale == 1 ? 0 : destinationBounds.left - insets.left * scale; in scaleAndCrop()
158 top = scale == 1 ? 0 : destinationBounds.top - insets.top * scale; in scaleAndCrop()
173 SurfaceControl leash, Rect sourceBounds, Rect destinationBounds, Rect insets, in rotateAndScaleWithCrop() argument
177 mTmpDestinationRect.inset(insets); in rotateAndScaleWithCrop()
190 crop.offset(insets.left, insets.top); in rotateAndScaleWithCrop()
193 positionX -= insets.left * scale; in rotateAndScaleWithCrop()
[all …]
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/
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()
/frameworks/base/libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/
DBubblePositionerTest.kt57 insets = Insets.of(0, 0, 0, 0)
69 val insets = Insets.of(10, 20, 5, 15) in testUpdate() constant
72 availableRect.inset(insets) in testUpdate()
73 positioner.update(defaultDeviceConfig.copy(insets = insets, windowBounds = screenBounds)) in testUpdate()
77 assertThat(positioner.insets).isEqualTo(insets) 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()
[all …]
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/
DPipSurfaceTransactionHelper.java131 Rect sourceBounds, Rect destinationBounds, Rect insets, in scaleAndCrop() argument
137 mTmpDestinationRect.inset(insets); in scaleAndCrop()
155 final float left = destinationBounds.left - insets.left * scale; in scaleAndCrop()
156 final float top = destinationBounds.top - insets.top * scale; in scaleAndCrop()
170 SurfaceControl leash, Rect sourceBounds, Rect destinationBounds, Rect insets, in rotateAndScaleWithCrop() argument
174 mTmpDestinationRect.inset(insets); in rotateAndScaleWithCrop()
187 crop.offset(insets.left, insets.top); in rotateAndScaleWithCrop()
190 positionX -= insets.left * scale; in rotateAndScaleWithCrop()
191 positionY -= insets.top * scale; in rotateAndScaleWithCrop()
195 positionX -= insets.top * scale; in rotateAndScaleWithCrop()
[all …]
/frameworks/base/graphics/java/android/view/
DPixelCopy.java260 final Rect insets = new Rect(); in request() local
261 final Surface surface = sourceForWindow(source, insets); in request()
262 request(surface, adjustSourceRectForInsets(insets, srcRect), dest, listener, in request()
302 private static Rect adjustSourceRectForInsets(Rect insets, Rect srcRect) { in adjustSourceRectForInsets() argument
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()
[all …]
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/pip/
DPipSurfaceTransactionHelper.java83 Rect sourceRectHint, Rect sourceBounds, Rect destinationBounds, Rect insets, in scaleAndCrop() argument
87 mTmpDestinationRect.inset(insets); in scaleAndCrop()
96 ? 0 : destinationBounds.left - (insets.left + sourceBounds.left) * scale; in scaleAndCrop()
98 ? 0 : destinationBounds.top - (insets.top + sourceBounds.top) * scale; in scaleAndCrop()
108 left = destinationBounds.left - (insets.left + sourceBounds.left) * scale; in scaleAndCrop()
109 top = destinationBounds.top - (insets.top + sourceBounds.top) * scale; in scaleAndCrop()
124 Rect sourceBounds, Rect destinationBounds, Rect insets, in scaleAndRotate() argument
128 mTmpDestinationRect.inset(insets); in scaleAndRotate()
140 adjustedPositionX = positionX + insets.top * scale; in scaleAndRotate()
141 adjustedPositionY = positionY + insets.left * scale; in scaleAndRotate()
[all …]
/frameworks/base/apct-tests/perftests/utils/src/android/perftests/utils/
DPerfTestActivity.java48 final Insets insets = w.getSystemWindowInsets(); in onCreate() local
49 v.setPadding(insets.left, insets.top, insets.right, insets.bottom); in onCreate()
/frameworks/opt/setupwizard/library/recyclerview/src/com/android/setupwizardlib/view/
DStickyHeaderRecyclerView.java124 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/
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()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
DPhoneStatusBarViewTest.kt187 val insets = Insets.of(/* left = */ 10, /* top = */ 20, /* right = */ 30, /* bottom = */ 40) in onAttachedToWindow_updatesLeftTopRightPaddingsBasedOnInsets() constant
189 .thenReturn(insets) in onAttachedToWindow_updatesLeftTopRightPaddingsBasedOnInsets()
193 assertThat(view.paddingLeft).isEqualTo(insets.left) in onAttachedToWindow_updatesLeftTopRightPaddingsBasedOnInsets()
194 assertThat(view.paddingTop).isEqualTo(insets.top) in onAttachedToWindow_updatesLeftTopRightPaddingsBasedOnInsets()
195 assertThat(view.paddingRight).isEqualTo(insets.right) in onAttachedToWindow_updatesLeftTopRightPaddingsBasedOnInsets()
201 val insets = Insets.of(/* left = */ 40, /* top = */ 30, /* right = */ 20, /* bottom = */ 10) in onConfigurationChanged_updatesLeftTopRightPaddingsBasedOnInsets() constant
203 .thenReturn(insets) in onConfigurationChanged_updatesLeftTopRightPaddingsBasedOnInsets()
207 assertThat(view.paddingLeft).isEqualTo(insets.left) in onConfigurationChanged_updatesLeftTopRightPaddingsBasedOnInsets()
208 assertThat(view.paddingTop).isEqualTo(insets.top) in onConfigurationChanged_updatesLeftTopRightPaddingsBasedOnInsets()
209 assertThat(view.paddingRight).isEqualTo(insets.right) in onConfigurationChanged_updatesLeftTopRightPaddingsBasedOnInsets()
[all …]
/frameworks/base/tests/MultiDeviceInput/src/test/multideviceinput/
DMainActivity.kt57 val insets = windowMetrics.windowInsets.getInsetsIgnoringVisibility(Type.systemBars()) in onResume() constant
58 val width = windowMetrics.bounds.width() - insets.left - insets.right in onResume()
59 val height = windowMetrics.bounds.height() - insets.top - insets.bottom in onResume()
/frameworks/base/core/java/com/android/internal/widget/
DActionBarOverlayLayout.java297 private boolean applyInsets(View view, Rect insets, boolean toPadding,
302 changed |= setPadding(view, insets, left, top, right, bottom);
305 changed |= setMargin(view, insets, left, top, right, bottom);
310 private boolean setPadding(View view, Rect insets,
312 if ((left && view.getPaddingLeft() != insets.left)
313 || (top && view.getPaddingTop() != insets.top)
314 || (right && view.getPaddingRight() != insets.right)
315 || (bottom && view.getPaddingBottom() != insets.bottom)) {
317 left ? insets.left : view.getPaddingLeft(),
318 top ? insets.top : view.getPaddingTop(),
[all …]
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/
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()

12345678