Searched refs:rect1 (Results 1 – 3 of 3) sorted by relevance
/packages/apps/Car/RotaryController/tests/unit/src/com/android/car/rotary/ |
D | FocusFinderTest.java | 156 final Rect rect1 = new Rect(0, 0, 20, 20); in testOverlapBeamsRightLeftUpToEdge() local 157 final Rect rect2 = new Rect(rect1); in testOverlapBeamsRightLeftUpToEdge() 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() 166 assertBeamsDontOverlap(View.FOCUS_LEFT, rect1, rect2); in testOverlapBeamsRightLeftUpToEdge() 167 assertBeamsDontOverlap(View.FOCUS_RIGHT, rect1, rect2); in testOverlapBeamsRightLeftUpToEdge() 171 assertBeamsDontOverlap(View.FOCUS_LEFT, rect1, rect2); in testOverlapBeamsRightLeftUpToEdge() 172 assertBeamsDontOverlap(View.FOCUS_RIGHT, rect1, rect2); in testOverlapBeamsRightLeftUpToEdge() 175 rect2.set(rect1); in testOverlapBeamsRightLeftUpToEdge() [all …]
|
/packages/apps/Car/RotaryController/src/com/android/car/rotary/ |
D | FocusFinder.java | 162 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() 175 majorAxisDistance(direction, source, rect1), in isBetterCandidate() 176 minorAxisDistance(direction, source, rect1)) in isBetterCandidate() 213 static boolean beamBeats(int direction, Rect source, Rect rect1, Rect rect2) { in beamBeats() argument 214 final boolean rect1InSrcBeam = beamsOverlap(direction, source, rect1); in beamBeats() 238 return majorAxisDistance(direction, source, rect1) in beamBeats() 247 static boolean beamsOverlap(int direction, Rect rect1, Rect rect2) { in beamsOverlap() argument 251 return (rect2.bottom > rect1.top) && (rect2.top < rect1.bottom); in beamsOverlap() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/widget/ |
D | LauncherAppWidgetHostView.java | 428 private static boolean isSameLocation(@NonNull RectF rect1, @Nullable RectF rect2, in isSameLocation() argument 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()
|