Home
last modified time | relevance | path

Searched refs:distance (Results 1 – 25 of 62) sorted by relevance

123

/packages/apps/Launcher3/src/com/android/launcher3/util/
DOverScroller.java544 void startScroll(int start, int distance, int duration) { in startScroll() argument
545 startScroll(start, distance, duration, 0); in startScroll()
548 void startScroll(int start, int distance, int duration, float velocity) { in startScroll() argument
552 mFinal = start + distance; in startScroll()
748 float distance = velocitySquared / (2.0f * Math.abs(mDeceleration)); in onEdgeReached() local
751 if (distance > mOver) { in onEdgeReached()
754 distance = mOver; in onEdgeReached()
757 mOver = (int) distance; in onEdgeReached()
759 mFinal = mStart + (int) (mVelocity > 0 ? distance : -distance); in onEdgeReached()
813 double distance = 0.0; in update() local
[all …]
/packages/apps/Dialer/java/com/android/incallui/answer/impl/affordance/
DSwipeButtonHelper.java181 float distance = (float) Math.hypot(xDist, yDist); in onTouchEvent() local
182 if (!touchSlopExeeded && distance > touchSlop) { in onTouchEvent()
187 distance = translationOnDown - distance; in onTouchEvent()
188 distance = Math.min(0, distance); in onTouchEvent()
190 distance = translationOnDown + distance; in onTouchEvent()
191 distance = Math.max(0, distance); in onTouchEvent()
193 setTranslation(distance, false /* isReset */, false /* animateReset */); in onTouchEvent()
235 double distance = Math.hypot(x - iconX, y - iconY); in isOnIcon() local
236 return distance <= touchTargetSize / 2; in isOnIcon()
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
DOverScroller.java682 void startScroll(int start, int distance, int duration) { in startScroll() argument
686 mFinal = start + distance; in startScroll()
855 float distance = mVelocity * mVelocity / (2.0f * Math.abs(mDeceleration)); in onEdgeReached() local
858 if (distance > mOver) { in onEdgeReached()
861 distance = mOver; in onEdgeReached()
864 mOver = (int) distance; in onEdgeReached()
866 mFinal = mStart + (int) (mVelocity > 0 ? distance : -distance); in onEdgeReached()
912 double distance = 0.0; in update() local
928 distance = distanceCoef * mSplineDistance; in update()
936 distance = mVelocity * t + mDeceleration * t * t / 2.0f; in update()
[all …]
/packages/apps/TV/common/src/com/android/tv/common/ui/setup/animation/
DFadeAndShortSlide.java51 ViewGroup sceneRoot, View view, int[] position, int distance); in getGoneX() argument
58 ViewGroup sceneRoot, View view, int[] position, int distance) {
63 x = view.getTranslationX() + distance;
65 x = view.getTranslationX() - distance;
75 ViewGroup sceneRoot, View view, int[] position, int distance) {
80 x = view.getTranslationX() - distance;
82 x = view.getTranslationX() + distance;
317 public void setDistance(int distance) { in setDistance() argument
318 mDistance = distance; in setDistance()
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/util/
DLevenshteinDistance.java77 int distance = distTab[s-1][t] + 1; in calculate() local
81 if (d + 1 < distance ) { in calculate()
82 distance = d + 1; in calculate()
87 if (d + cost < distance) { in calculate()
88 distance = d + cost; in calculate()
91 distTab[s][t] = distance; in calculate()
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DPaper.java36 public void overScroll(float distance) { in overScroll() argument
37 distance /= mWidth; // make it relative to width in overScroll()
38 if (distance < 0) { in overScroll()
39 mAnimationLeft.onPull(-distance); in overScroll()
41 mAnimationRight.onPull(distance); in overScroll()
DScrollerHelper.java85 public int startScroll(int distance, int min, int max) { in startScroll() argument
89 int newPosition = Utils.clamp(finalPosition + distance, min, max); in startScroll()
95 return finalPosition + distance - newPosition; in startScroll()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/
DKeyDetector.java103 final int distance = key.squaredDistanceToEdge(touchX, touchY); in detectHitKey() local
104 if (distance > minDistance) { in detectHitKey()
108 if (primaryKey == null || distance < minDistance in detectHitKey()
110 minDistance = distance; in detectHitKey()
/packages/services/Car/car-lib/src/android/car/navigation/
Dnavigation_state.proto75 // Possible units used to display this distance.
77 // Display unit is unknown, no distance information should be displayed.
86 // The distance in meters.
89 // The distance measured in the unit indicated at `display_units`, already
90 // internationalized and ready for display, or empty if no distance value was
91 // provided. If empty, the distance shouldn’t be displayed to the driver.
93 // This distance is for display only (it might be a rounded representation of
94 // the actual distance) and must match the distance displayed anywhere else
97 // For example, a distance of 1200 meters in ES_es locale could be
101 // The distance unit that should be used to display the distance value
[all …]
/packages/apps/Car/libs/car-ui-lib/tests/robotests/src/com/android/car/ui/recyclerview/
DCarUiSnapHelperTest.java76 int[] distance = mCarUiSnapHelper.calculateDistanceToFinalSnap(mLayoutManager, mChild); in calculateDistanceToFinalSnap_shouldReturnTopMarginDifference() local
78 assertThat(distance[1]).isEqualTo(10); in calculateDistanceToFinalSnap_shouldReturnTopMarginDifference()
93 int[] distance = mCarUiSnapHelper.calculateScrollDistance(0, 10); in calculateScrollDistance_shouldScrollHeightOfView() local
95 assertThat(distance[1]).isEqualTo(50); in calculateScrollDistance_shouldScrollHeightOfView()
/packages/apps/Launcher3/src/com/android/launcher3/testing/
DTestInformationHandler.java71 final float distance = mLauncher.getAllAppsController().getShiftRange() * progress; in call() local
72 response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, (int) distance); in call()
81 final float distance = mLauncher.getAllAppsController().getShiftRange() * progress; in call() local
82 response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, (int) distance); in call()
/packages/apps/Car/Cluster/src/android/car/cluster/
DNavStateController.java77 mDistance = container.findViewById(R.id.distance); in NavStateController()
324 private String formatDistance(@Nullable Distance distance) { in formatDistance() argument
325 if (distance == null || distance.getDisplayUnits() == Distance.Unit.UNKNOWN) { in formatDistance()
331 switch (distance.getDisplayUnits()) { in formatDistance()
348 return String.format("In %s %s", distance.getDisplayValue(), unit); in formatDistance()
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/result/
Dsuggestions_output_utils.cpp205 const float distance = terminalDicNode->getNormalizedCompoundDistanceAfterFirstWord(); in computeFirstWordConfidence() local
230 const float clampedDistance = distance < MIN_EXPECTED_DISTANCE ? MIN_EXPECTED_DISTANCE in computeFirstWordConfidence()
231 : distance > MAX_EXPECTED_DISTANCE ? MAX_EXPECTED_DISTANCE : distance; in computeFirstWordConfidence()
/packages/services/Car/evs/app/
Dconfig.json.readme17 "wheelBase" : 117.9, // The distance between the front and read axel
33 "x" : 0.0, // Optical center distance right of vehicle center
34 "y" : -40.0, // Optical center distance forward of rear axel
35 "z" : 48, // Optical center distance above ground
/packages/inputmethods/LatinIME/native/jni/src/utils/
Dautocorrection_threshold_utils.cpp75 const int distance = editDistance(before, beforeLength, after, afterLength); in calcNormalizedScore() local
87 if (score <= 0 || distance >= afterLength) { in calcNormalizedScore()
93 const float weight = 1.0f - static_cast<float>(distance) / static_cast<float>(afterLength); in calcNormalizedScore()
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DLocationClustering.java255 float distance = (float) GalleryUtils.fastDistanceMeters( in kMeans() local
260 if (distance < 1) { in kMeans()
261 distance = 0; in kMeans()
263 if (distance < bestDistance) { in kMeans()
264 bestDistance = distance; in kMeans()
/packages/apps/Car/libs/car-ui-lib/src/com/android/car/ui/recyclerview/
DCarUiSnapHelper.java534 int distance = in estimateNextPositionDiffForFling() local
536 return (int) Math.round(distance / distancePerChild); in estimateNextPositionDiffForFling()
572 int distance = end - start; in computeDistancePerChild() local
573 if (distance == 0) { in computeDistancePerChild()
576 return 1f * distance / ((maxPos - minPos) + 1); in computeDistancePerChild()
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/util/
DLevenshteinDistanceTest.java43 LevenshteinDistance distance = new LevenshteinDistance(sourceTokens, targetTokens); in verifyTargetOperations() local
45 assertEquals(expectedDistance, distance.calculate()); in verifyTargetOperations()
46 EditOperation[] ops = distance.getTargetOperations(); in verifyTargetOperations()
/packages/apps/Launcher3/src/com/android/launcher3/
DWorkspace.java1587 float distance = dropTargetLayout.getDistanceFromCell(mDragViewVisualCenter[0], in acceptDrop() local
1590 dropTargetLayout, mTargetCell, distance, true)) { in acceptDrop()
1595 dropTargetLayout, mTargetCell, distance)) { in acceptDrop()
1621 float distance, boolean considerTimeout) { in willCreateUserFolder() argument
1622 if (distance > mMaxDistanceForFolderCreation) return false; in willCreateUserFolder()
1654 float distance) { in willAddToExistingUserFolder() argument
1655 if (distance > mMaxDistanceForFolderCreation) return false; in willAddToExistingUserFolder()
1678 int[] targetCell, float distance, boolean external, DragView dragView) { in createUserFolderIfNecessary() argument
1679 if (distance > mMaxDistanceForFolderCreation) return false; in createUserFolderIfNecessary()
1735 float distance, DragObject d, boolean external) { in addToExistingFolderIfNecessary() argument
[all …]
/packages/apps/PermissionController/src/android/support/wearable/view/
DWearableListView.java321 float distance = (deltaX * deltaX) + (deltaY * deltaY); in handlePossibleVerticalSwipe() local
324 if (distance > (mTouchSlop * mTouchSlop)) { in handlePossibleVerticalSwipe()
632 final int distance = Math.abs(centerY - childCenterY); in findCenterViewIndex() local
633 if (distance < closest) { in findCenterViewIndex()
634 closest = distance; in findCenterViewIndex()
852 final int distance = Math.abs(centerY - childCenterY); in findCenterViewIndex() local
853 if (distance < closest) { in findCenterViewIndex()
854 closest = distance; in findCenterViewIndex()
/packages/apps/Dialer/java/com/android/contacts/common/util/
DMaterialColorMapUtils.java94 final float distance = Math.abs(comparedHue - colorHue); in calculatePrimaryAndSecondaryColor() local
95 if (distance < minimumDistance) { in calculatePrimaryAndSecondaryColor()
96 minimumDistance = distance; in calculatePrimaryAndSecondaryColor()
/packages/apps/Contacts/src/com/android/contacts/util/
DMaterialColorMapUtils.java124 final float distance = Math.abs(comparedHue - colorHue); in calculatePrimaryAndSecondaryColor() local
125 if (distance < minimumDistance) { in calculatePrimaryAndSecondaryColor()
126 minimumDistance = distance; in calculatePrimaryAndSecondaryColor()
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarNavigationManagerTest.java64 Distance distance = Distance.newBuilder().build(); in testSerializeAndDeserializeProto() local
78 assertNotNull(distance); in testSerializeAndDeserializeProto()
92 assertNotNull(Distance.parseFrom(distance.toByteArray())); in testSerializeAndDeserializeProto()
/packages/apps/Gallery2/src/com/android/gallery3d/app/
DEyePosition.java146 float distance = (gx > 0 ? gx : -gx) + (gy > 0 ? gy : - gy); in onGyroscopeChanged() local
147 if (distance < GYROSCOPE_THRESHOLD in onGyroscopeChanged()
148 || distance > GYROSCOPE_LIMIT || mGyroscopeCountdown > 0) { in onGyroscopeChanged()
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/
DPhotoTouchListener.java208 double distance = Math.hypot(x0 - mInitialTouchX, in onTouch() local
211 if (distance < mTouchSlop) { in onTouch()
221 distance < mTouchSlop) { in onTouch()

123