Home
last modified time | relevance | path

Searched refs:direction (Results 1 – 25 of 191) sorted by relevance

12345678

/packages/apps/Car/RotaryController/src/com/android/car/rotary/
DFocusFinder.java49 static boolean isPartiallyInDirection(Rect srcRect, Rect destRect, int direction) { in isPartiallyInDirection() argument
50 switch (direction) { in isPartiallyInDirection()
73 static boolean isInDirection(Rect srcRect, Rect destRect, int direction) { in isInDirection() argument
76 if (isStrictlyInDirection(srcRect, destRect, direction)) { in isInDirection()
83 if (direction != DIRECTIONS[i] in isInDirection()
90 switch (direction) { in isInDirection()
126 static boolean isCandidate(Rect srcRect, Rect destRect, int direction) { in isCandidate() argument
127 switch (direction) { in isCandidate()
162 static boolean isBetterCandidate(int direction, Rect source, Rect rect1, Rect rect2) { in isBetterCandidate() argument
164 if (beamBeats(direction, source, rect1, rect2)) { in isBetterCandidate()
[all …]
DNavigator.java146 @NonNull AccessibilityNodeInfo sourceNode, int direction, int rotationCount) { in findRotateTarget() argument
155 nextCandidate = findNextFocusableInWebView(webView, candidate, direction); in findRotateTarget()
160 nextCandidate = candidate.focusSearch(direction); in findRotateTarget()
197 direction == View.FOCUS_FORWARD in findRotateTarget()
397 int direction) { in findNudgeTargetFocusArea() argument
422 direction)) { in findNudgeTargetFocusArea()
426 addWindowsInDirection(windows, currentWindow, candidateWindows, direction, in findNudgeTargetFocusArea()
442 chooseBestNudgeCandidate(sourceNode, candidateFocusAreas, direction); in findNudgeTargetFocusArea()
455 int direction) { in shouldNudgeOutOfIme() argument
460 if (isCandidate(sourceBounds, sourceFocusAreaBounds, candidate, direction)) { in shouldNudgeOutOfIme()
[all …]
DRotaryService.java1437 private void handleNudgeEvent(@View.FocusRealDirection int direction, int action) { in handleNudgeEvent() argument
1448 injectKeyEventForDirection(direction, action); in handleNudgeEvent()
1464 if (initFocus(windows, direction)) { in handleNudgeEvent()
1472 && direction != mHunEscapeNudgeDirection) { in handleNudgeEvent()
1479 nudgeTo(windows, direction); in handleNudgeEvent()
1485 @View.FocusRealDirection int direction) { in nudgeTo() argument
1487 boolean hunFocusResult = focusHunsWindow(windows, direction); in nudgeTo()
1499 arguments.putInt(NUDGE_DIRECTION, direction); in nudgeTo()
1513 arguments.putInt(NUDGE_DIRECTION, direction); in nudgeTo()
1527 mNavigator.findNudgeTargetFocusArea(windows, mFocusedNode, mFocusArea, direction); in nudgeTo()
[all …]
/packages/apps/Car/RotaryController/tests/unit/src/com/android/car/rotary/
DNavigatorTest.java114 int direction = View.FOCUS_FORWARD; in testFindRotateTarget() local
117 FindRotateTargetResult target = mNavigator.findRotateTarget(button1, direction, 1); in testFindRotateTarget()
124 target = mNavigator.findRotateTarget(button1, direction, 2); in testFindRotateTarget()
149 int direction = View.FOCUS_FORWARD; in testFindRotateTargetNoWrapAround() local
152 FindRotateTargetResult target = mNavigator.findRotateTarget(button2, direction, 1); in testFindRotateTargetNoWrapAround()
174 int direction = View.FOCUS_FORWARD; in testFindRotateTargetNoWrapAroundWithGenericFpv() local
177 FindRotateTargetResult target = mNavigator.findRotateTarget(button2, direction, 1); in testFindRotateTargetNoWrapAroundWithGenericFpv()
197 int direction = View.FOCUS_FORWARD; in testFindRotateTargetNoWrapAround2() local
200 FindRotateTargetResult target = mNavigator.findRotateTarget(button2, direction, 1); in testFindRotateTargetNoWrapAround2()
220 int direction = View.FOCUS_FORWARD; in testFindRotateTargetNoWrapAround2WithGenericFpv() local
[all …]
DFocusFinderTest.java509 private void assertIsPartiallyInDirection(int direction, Rect src, Rect dest) { in assertIsPartiallyInDirection() argument
510 String directionStr = validateAndGetStringFor(direction); in assertIsPartiallyInDirection()
514 assertTrue(assertMsg, FocusFinder.isPartiallyInDirection(src, dest, direction)); in assertIsPartiallyInDirection()
517 private void assertIsInDirection(int direction, Rect src, Rect dest) { in assertIsInDirection() argument
518 String directionStr = validateAndGetStringFor(direction); in assertIsInDirection()
521 assertTrue(assertMsg, FocusFinder.isInDirection(src, dest, direction)); in assertIsInDirection()
524 private void assertIsNotInDirection(int direction, Rect src, Rect dest) { in assertIsNotInDirection() argument
525 String directionStr = validateAndGetStringFor(direction); in assertIsNotInDirection()
528 assertFalse(assertMsg, FocusFinder.isInDirection(src, dest, direction)); in assertIsNotInDirection()
531 private void assertBeamsOverlap(int direction, Rect rect1, Rect rect2) { in assertBeamsOverlap() argument
[all …]
/packages/apps/TV/src/com/android/tv/guide/
DProgramRow.java119 private boolean isDirectionStart(int direction) { in isDirectionStart() argument
121 ? direction == View.FOCUS_LEFT in isDirectionStart()
122 : direction == View.FOCUS_RIGHT; in isDirectionStart()
126 private boolean isDirectionEnd(int direction) { in isDirectionEnd() argument
128 ? direction == View.FOCUS_RIGHT in isDirectionEnd()
129 : direction == View.FOCUS_LEFT; in isDirectionEnd()
133 void focusSearchAccessibility(View focused, int direction) { in focusSearchAccessibility() argument
137 if (isDirectionEnd(direction) || direction == View.FOCUS_FORWARD) { in focusSearchAccessibility()
145 public View focusSearch(View focused, int direction) { in focusSearch() argument
151 && (isDirectionStart(direction) || direction == View.FOCUS_BACKWARD)) { in focusSearch()
[all …]
DProgramGrid.java154 public View focusSearch(View focused, int direction) { in focusSearch() argument
157 return super.focusSearch(focused, direction); in focusSearch()
159 if (direction == View.FOCUS_UP || direction == View.FOCUS_DOWN) { in focusSearch()
160 updateUpDownFocusState(focused, direction); in focusSearch()
161 View nextFocus = focusFind(focused, direction); in focusSearch()
166 return super.focusSearch(focused, direction); in focusSearch()
170 public boolean onRequestFocusInDescendants(int direction, Rect previouslyFocusedRect) { in onRequestFocusInDescendants() argument
176 return super.onRequestFocusInDescendants(direction, previouslyFocusedRect); in onRequestFocusInDescendants()
245 private View focusFind(View focused, int direction) { in focusFind() argument
252 direction == View.FOCUS_UP ? focusedChildIndex - 1 : focusedChildIndex + 1; in focusFind()
[all …]
/packages/apps/Car/libs/car-ui-lib/car-rotary-lib/src/main/java/com/android/car/ui/
DFocusArea.java554 int direction = getNudgeDirection(arguments); in performAccessibilityAction() local
555 if (direction != INVALID_DIRECTION) { in performAccessibilityAction()
556 saveFocusAreaHistory(direction, mPreviousFocusArea, this, in performAccessibilityAction()
586 int direction = getNudgeDirection(arguments); in nudgeToShortcutView() local
587 View targetView = getSpecifiedShortcut(direction); in nudgeToShortcutView()
601 int direction = getNudgeDirection(arguments); in nudgeToAnotherFocusArea() local
605 FocusArea targetFocusArea = getSpecifiedFocusArea(direction); in nudgeToAnotherFocusArea()
610 targetFocusArea = mRotaryCache.getCachedFocusArea(direction, elapsedRealtime); in nudgeToAnotherFocusArea()
623 private void saveFocusAreaHistory(int direction, @NonNull FocusArea sourceFocusArea, in saveFocusAreaHistory() argument
626 if (sourceFocusArea.mRotaryCache.getCachedFocusArea(direction, elapsedRealtime) == null) { in saveFocusAreaHistory()
[all …]
DRotaryCache.java153 void put(int direction, @NonNull FocusArea targetFocusArea, long elapsedRealtime) { in put() argument
157 put(direction, new FocusAreaHistory(targetFocusArea, elapsedRealtime)); in put()
160 FocusArea get(int direction, long elapsedRealtime) { in get() argument
161 FocusAreaHistory history = get(direction); in get()
208 FocusArea getCachedFocusArea(int direction, long elapsedRealtime) { in getCachedFocusArea() argument
209 return mFocusAreaCache.get(direction, elapsedRealtime); in getCachedFocusArea()
213 void saveFocusArea(int direction, @NonNull FocusArea targetFocusArea, long elapsedRealtime) { in saveFocusArea() argument
214 mFocusAreaCache.put(direction, targetFocusArea, elapsedRealtime); in saveFocusArea()
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/bots/
DSortBot.java70 public void sortBy(@SortDimensionId int id, @SortDirection int direction) { in sortBy() argument
71 assert(direction != SortDimension.SORT_DIRECTION_NONE); in sortBy()
77 result = mColumnBot.sortBy(label, direction); in sortBy()
79 result = sortByMenu(id, direction); in sortBy()
82 assertTrue("Sorting by id: " + id + " in direction: " + direction + " failed.", in sortBy()
105 private boolean sortByMenu(@SortDimensionId int id, @SortDirection int direction) { in sortByMenu() argument
106 assert(direction != SortDimension.SORT_DIRECTION_NONE); in sortByMenu()
112 @StringRes int labelRes = SortListFragment.getSheetLabelId(dimension, direction); in sortByMenu()
134 private boolean sortBy(String label, @SortDirection int direction) { in sortBy() argument
142 if (viewDirection != direction) { in sortBy()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/
DCellLayout.java1295 private int[] findNearestArea(int cellX, int cellY, int spanX, int spanY, int[] direction, in findNearestArea() argument
1322 int curDirectionScore = direction[0] * curDirection[0] + in findNearestArea()
1323 direction[1] * curDirection[1]; in findNearestArea()
1344 int[] direction, ItemConfiguration currentState) { in addViewToTempLocation() argument
1350 findNearestArea(c.cellX, c.cellY, c.spanX, c.spanY, direction, in addViewToTempLocation()
1548 int[] direction, View dragView, ItemConfiguration currentState) { in pushViewsToTempLocation() argument
1558 if (direction[0] < 0) { in pushViewsToTempLocation()
1561 } else if (direction[0] > 0) { in pushViewsToTempLocation()
1564 } else if (direction[1] < 0) { in pushViewsToTempLocation()
1643 int[] direction, View dragView, ItemConfiguration currentState) { in addViewsToTempLocation() argument
[all …]
DPagedView.java795 protected boolean onRequestFocusInDescendants(int direction, Rect previouslyFocusedRect) { in onRequestFocusInDescendants() argument
804 return v.requestFocus(direction, previouslyFocusedRect); in onRequestFocusInDescendants()
810 public boolean dispatchUnhandledMove(View focused, int direction) { in dispatchUnhandledMove() argument
811 if (super.dispatchUnhandledMove(focused, direction)) { in dispatchUnhandledMove()
816 if (direction == View.FOCUS_LEFT) { in dispatchUnhandledMove()
817 direction = View.FOCUS_RIGHT; in dispatchUnhandledMove()
818 } else if (direction == View.FOCUS_RIGHT) { in dispatchUnhandledMove()
819 direction = View.FOCUS_LEFT; in dispatchUnhandledMove()
822 if (direction == View.FOCUS_LEFT) { in dispatchUnhandledMove()
826 getChildAt(nextPage).requestFocus(direction); in dispatchUnhandledMove()
[all …]
/packages/apps/Car/Hvac/src/com/android/car/hvac/ui/
DFanDirectionButtons.java53 void onFanDirectionClicked(@FanDirection int direction); in onFanDirectionClicked() argument
80 public void setFanDirection(@FanDirection int direction) { in setFanDirection() argument
81 if (direction != mCurrentDirection) { in setFanDirection()
82 updateFanButtonToOn(direction); in setFanDirection()
99 int direction = (int) v.getTag(); in onFinishInflate()
100 if (direction != mCurrentDirection) { in onFinishInflate()
101 updateFanButtonToOn(direction); in onFinishInflate()
103 mListener.onFanDirectionClicked(direction); in onFinishInflate()
/packages/apps/Car/libs/car-ui-lib/car-rotary-lib/src/androidTest/java/com/android/car/ui/
DRotaryCacheTest.java78 int direction = View.FOCUS_LEFT; in testGetCachedFocusArea_inTheCache() local
79 mRotaryCache.saveFocusArea(direction, mFocusArea, 0); in testGetCachedFocusArea_inTheCache()
80 FocusArea focusArea = mRotaryCache.getCachedFocusArea(direction, mValidTime); in testGetCachedFocusArea_inTheCache()
86 int direction = View.FOCUS_LEFT; in testGetCachedFocusArea_notInTheCache() local
87 mRotaryCache.saveFocusArea(direction, mFocusArea, 0); in testGetCachedFocusArea_notInTheCache()
97 int direction = View.FOCUS_LEFT; in testGetCachedFocusArea_expiredCache() local
98 mRotaryCache.saveFocusArea(direction, mFocusArea, 0); in testGetCachedFocusArea_expiredCache()
99 FocusArea focusArea = mRotaryCache.getCachedFocusArea(direction, mExpiredTime); in testGetCachedFocusArea_expiredCache()
/packages/apps/DocumentsUI/src/com/android/documentsui/sorting/
DSortModel.java175 public void sortByUser(int dimensionId, @SortDirection int direction) { in sortByUser() argument
181 sortByDimension(dimension, direction); in sortByUser()
191 SortDimension newSortedDimension, @SortDirection int direction) { in sortByDimension() argument
193 && mSortedDimension.mSortDirection == direction) { in sortByDimension()
198 if ((newSortedDimension.getSortCapability() & direction) == 0) { in sortByDimension()
201 + " can't be sorted in direction:" + direction); in sortByDimension()
204 switch (direction) { in sortByDimension()
207 newSortedDimension.mSortDirection = direction; in sortByDimension()
210 throw new IllegalArgumentException("Unknown sort direction: " + direction); in sortByDimension()
322 final String direction; in getDocumentSortQuery() local
[all …]
DSortListFragment.java60 mModel.sortByUser(item.id, item.direction); in onItemClicked()
97 …blic static @StringRes int getSheetLabelId(SortDimension dimension, @SortDirection int direction) { in getSheetLabelId() argument
98 boolean isAscending = direction == SortDimension.SORT_DIRECTION_ASCENDING; in getSheetLabelId()
165 && item.direction == mModel.getCurrentSortDirection(); in getView()
174 @SortDirection final int direction; field in SortListFragment.SortItem
179 direction = dimension.getDefaultSortDirection(); in SortItem()
183 SortItem(@SortDimensionId int id, @SortDirection int direction, @StringRes int labelId) { in SortItem() argument
185 this.direction = direction; in SortItem()
/packages/apps/TV/src/com/android/tv/menu/
DMenuView.java192 protected boolean onRequestFocusInDescendants(int direction, Rect previouslyFocusedRect) { in onRequestFocusInDescendants() argument
198 return super.onRequestFocusInDescendants(direction, previouslyFocusedRect); in onRequestFocusInDescendants()
249 public View focusSearch(View focused, int direction) { in focusSearch() argument
253 if (direction == View.FOCUS_UP || direction == View.FOCUS_DOWN) { in focusSearch()
254 return getUpDownFocus(focused, direction); in focusSearch()
256 return super.focusSearch(focused, direction); in focusSearch()
259 private View getUpDownFocus(View focused, int direction) { in getUpDownFocus() argument
260 View newView = super.focusSearch(focused, direction); in getUpDownFocus()
265 if (direction == View.FOCUS_UP) { in getUpDownFocus()
/packages/apps/Launcher3/src/com/android/launcher3/touch/
DSingleAxisSwipeDetector.java52 float extractDirection(PointF direction) {
53 return direction.y;
57 float extractOrthogonalDirection(PointF direction) {
58 return direction.x;
83 float extractDirection(PointF direction) {
84 return direction.x;
88 float extractOrthogonalDirection(PointF direction) {
89 return direction.y;
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DEdgeView.java103 public void onPull(int offset, int direction) { in onPull() argument
104 int fullLength = ((direction & 1) == 0) ? getWidth() : getHeight(); in onPull()
105 mEffect[direction].onPull((float)offset / fullLength); in onPull()
106 if (!mEffect[direction].isFinished()) { in onPull()
126 public void onAbsorb(int velocity, int direction) { in onAbsorb() argument
127 mEffect[direction].onAbsorb(velocity); in onAbsorb()
128 if (!mEffect[direction].isFinished()) { in onAbsorb()
/packages/modules/adb/
Dtransfer_id.h28 TransferDirection direction : 1; member
39 constexpr TransferId(TransferDirection direction, uint64_t id) : direction(direction), id(id) {} in TransferId()
47 return static_cast<uint64_t>(direction) << 63 | id; in uint64_t()
62 result.direction = static_cast<TransferDirection>(!!(value & mask)); in from_value()
/packages/modules/IPsec/tests/cts/src/android/ipsec/ike/cts/
DIkeSessionTestBase.java406 public void onIpSecTransformCreated(@NonNull IpSecTransform ipSecTransform, int direction) { in onIpSecTransformCreated() argument
408 new IpSecTransformCallRecord(ipSecTransform, direction)); in onIpSecTransformCreated()
426 public void onIpSecTransformDeleted(@NonNull IpSecTransform ipSecTransform, int direction) { in onIpSecTransformDeleted() argument
428 new IpSecTransformCallRecord(ipSecTransform, direction)); in onIpSecTransformDeleted()
493 public final int direction;
495 IpSecTransformCallRecord(IpSecTransform ipSecTransform, @PolicyDirection int direction) {
497 this.direction = direction;
502 return Objects.hash(ipSecTransform, direction);
510 return ipSecTransform.equals(record.ipSecTransform) && direction == record.direction;
589 resultDirections.add(transformRecordA.direction);
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/suggestions/
DSuggestionItemView.java87 public View focusSearch(View focused, int direction) { in focusSearch() argument
91 && ((isRTL && direction == ViewGroup.FOCUS_RIGHT) in focusSearch()
92 || (!isRTL && direction == ViewGroup.FOCUS_LEFT))) { in focusSearch()
95 && ((isRTL && direction == ViewGroup.FOCUS_LEFT) in focusSearch()
96 || (!isRTL && direction == ViewGroup.FOCUS_RIGHT))) { in focusSearch()
99 return super.focusSearch(focused, direction); in focusSearch()
/packages/apps/TV/tests/common/src/com/android/tv/testing/uihelper/
DUiDeviceAsserts.java109 UiDevice uiDevice, UiObject2 container, BySelector selector, Direction direction) { in assertNavigateTo() argument
124 UiDeviceUtils.pressDpad(uiDevice, direction); in assertNavigateTo()
140 if (!UiObject2Utils.hasSiblingInDirection(focusedChild, direction)) { in assertNavigateTo()
141 direction = Direction.reverse(direction); in assertNavigateTo()
144 UiDeviceUtils.pressDpad(uiDevice, direction); in assertNavigateTo()
/packages/apps/Car/Hvac/src/com/android/car/hvac/controllers/
DFanDirectionButtonsController.java61 public void onFanDirectionClicked(@FanDirectionButtons.FanDirection int direction) {
62 mHvacController.setFanDirection(mFanDirectionMap.get(direction));
68 public void onFanDirectionChange(int direction) {
69 int index = mFanDirectionMap.indexOfValue(direction);
71 Log.w(TAG, "Unexpected fan direction: " + direction);
/packages/apps/Launcher3/src/com/android/launcher3/folder/
DFolderPagedView.java440 public void showScrollHint(int direction) { in showScrollHint() argument
441 float fraction = (direction == Folder.SCROLL_LEFT) ^ mIsRtl in showScrollHint()
534 int direction; in realTimeReorder() local
541 direction = 1; in realTimeReorder()
559 direction = -1; in realTimeReorder()
579 int rankToMove = moveStart + direction; in realTimeReorder()
607 .translationXBy((direction > 0 ^ mIsRtl) ? -v.getWidth() : v.getWidth()) in realTimeReorder()
617 if ((endPos - startPos) * direction <= 0) { in realTimeReorder()
623 for (int i = startPos; i != endPos; i += direction) { in realTimeReorder()
624 int nextPos = i + direction; in realTimeReorder()

12345678