Searched refs:rect2 (Results 1 – 3 of 3) sorted by relevance
/packages/apps/Car/RotaryController/tests/unit/src/com/android/car/rotary/ |
D | FocusFinderTest.java | 157 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/ |
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() 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/Car/SystemUI/tests/src/com/android/systemui/car/userpicker/ |
D | UserPickerItemSpacingDecorationTest.java | 114 Rect rect2 = new Rect(); in testAllElementsHaveCorrectHorizontalSpacing() local 117 mSpacingDecoration.getItemOffsets(rect2, mViews.get(i), mMockRecyclerView, in testAllElementsHaveCorrectHorizontalSpacing() 119 assertThat(rect1.right + rect2.left).isEqualTo(TEST_HORIZONTAL_SPACING); in testAllElementsHaveCorrectHorizontalSpacing()
|