Home
last modified time | relevance | path

Searched refs:distance (Results 1 – 25 of 59) 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/Launcher3/src/com/android/launcher3/testing/
DTestInformationHandler.java62 final float distance = mLauncher.getAllAppsController().getShiftRange() * progress; in call() local
63 response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, (int) distance); in call()
72 final float distance = mLauncher.getAllAppsController().getShiftRange() * progress; in call() local
73 response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, (int) distance); in call()
/packages/apps/Car/Cluster/src/android/car/cluster/
DNavStateController.java68 mDistance = container.findViewById(R.id.distance); in NavStateController()
297 private String formatDistance(@Nullable Distance distance) { in formatDistance() argument
298 if (distance == null || distance.getDisplayUnits() == Distance.Unit.UNKNOWN) { in formatDistance()
304 switch (distance.getDisplayUnits()) { in formatDistance()
321 return String.format("In %s %s", distance.getDisplayValue(), unit); in formatDistance()
/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/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/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/Launcher3/src/com/android/launcher3/
DWorkspace.java1575 float distance = dropTargetLayout.getDistanceFromCell(mDragViewVisualCenter[0], in acceptDrop() local
1578 dropTargetLayout, mTargetCell, distance, true)) { in acceptDrop()
1583 dropTargetLayout, mTargetCell, distance)) { in acceptDrop()
1609 float distance, boolean considerTimeout) { in willCreateUserFolder() argument
1610 if (distance > mMaxDistanceForFolderCreation) return false; in willCreateUserFolder()
1642 float distance) { in willAddToExistingUserFolder() argument
1643 if (distance > mMaxDistanceForFolderCreation) return false; in willAddToExistingUserFolder()
1666 int[] targetCell, float distance, boolean external, DragView dragView) { in createUserFolderIfNecessary() argument
1667 if (distance > mMaxDistanceForFolderCreation) return false; in createUserFolderIfNecessary()
1723 float distance, DragObject d, boolean external) { in addToExistingFolderIfNecessary() argument
[all …]
/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/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/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()
/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/providers/ContactsProvider/src/com/android/providers/contacts/aggregation/util/
DContactMatcher.java229 float distance = nameDistance.getDistance(decodedCandidateName, decodedName); in matchName() local
235 if (distance > threshold) { in matchName()
236 score = (int)(minScore + (maxScore - minScore) * (1.0f - distance)); in matchName()
DRawContactMatcher.java227 float distance = nameDistance.getDistance(decodedCandidateName, decodedName); in matchName() local
233 if (distance > threshold) { in matchName()
234 score = (int)(minScore + (maxScore - minScore) * (1.0f - distance)); in matchName()

123