Home
last modified time | relevance | path

Searched refs:rect2 (Results 1 – 3 of 3) sorted by relevance

/packages/apps/Car/RotaryController/tests/unit/src/com/android/car/rotary/
DFocusFinderTest.java157 final Rect rect2 = new Rect(rect1); in testOverlapBeamsRightLeftUpToEdge() local
160 rect2.offset(0, rect1.height() - 1); in testOverlapBeamsRightLeftUpToEdge()
161 assertBeamsOverlap(View.FOCUS_LEFT, rect1, rect2); in testOverlapBeamsRightLeftUpToEdge()
162 assertBeamsOverlap(View.FOCUS_RIGHT, rect1, rect2); in testOverlapBeamsRightLeftUpToEdge()
165 rect2.offset(0, 1); in testOverlapBeamsRightLeftUpToEdge()
166 assertBeamsDontOverlap(View.FOCUS_LEFT, rect1, rect2); in testOverlapBeamsRightLeftUpToEdge()
167 assertBeamsDontOverlap(View.FOCUS_RIGHT, rect1, rect2); in testOverlapBeamsRightLeftUpToEdge()
170 rect2.offset(0, 1); in testOverlapBeamsRightLeftUpToEdge()
171 assertBeamsDontOverlap(View.FOCUS_LEFT, rect1, rect2); in testOverlapBeamsRightLeftUpToEdge()
172 assertBeamsDontOverlap(View.FOCUS_RIGHT, rect1, rect2); in testOverlapBeamsRightLeftUpToEdge()
[all …]
/packages/apps/Car/RotaryController/src/com/android/car/rotary/
DFocusFinder.java162 static boolean isBetterCandidate(int direction, Rect source, Rect rect1, Rect rect2) { in isBetterCandidate() argument
164 if (beamBeats(direction, source, rect1, rect2)) { in isBetterCandidate()
169 if (beamBeats(direction, source, rect2, rect1)) { in isBetterCandidate()
178 majorAxisDistance(direction, source, rect2), in isBetterCandidate()
179 minorAxisDistance(direction, source, rect2)); in isBetterCandidate()
213 static boolean beamBeats(int direction, Rect source, Rect rect1, Rect rect2) { in beamBeats() argument
215 final boolean rect2InSrcBeam = beamsOverlap(direction, source, rect2); in beamBeats()
226 if (!isToDirectionOf(direction, source, rect2)) { in beamBeats()
239 < majorAxisDistanceToFarEdge(direction, source, rect2); in beamBeats()
247 static boolean beamsOverlap(int direction, Rect rect1, Rect rect2) { in beamsOverlap() argument
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/widget/
DLauncherAppWidgetHostView.java428 private static boolean isSameLocation(@NonNull RectF rect1, @Nullable RectF rect2, in isSameLocation() argument
430 if (rect2 == null) return false; in isSameLocation()
431 return isSameCoordinate(rect1.left, rect2.left, epsilon) in isSameLocation()
432 && isSameCoordinate(rect1.right, rect2.right, epsilon) in isSameLocation()
433 && isSameCoordinate(rect1.top, rect2.top, epsilon) in isSameLocation()
434 && isSameCoordinate(rect1.bottom, rect2.bottom, epsilon); in isSameLocation()