/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
D | OverScroller.java | 682 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/DeskClock/src/com/android/deskclock/widget/sgv/ |
D | OverScrollerSGV.java | 681 void startScroll(int start, int distance, int duration) { in startScroll() argument 685 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/Browser/src/com/android/browser/ |
D | NavTabScroller.java | 280 int distance = target - (mHorizontal ? v.getTop() : v.getLeft()); in animateOut() local 281 long duration = (long) (Math.abs(distance) * 1000 / Math.abs(velocity)); in animateOut() 432 protected void onOrthoDrag(View v, float distance) { in onOrthoDrag() argument 434 offsetView(v, distance); in onOrthoDrag() 464 private void offsetView(View v, float distance) { in offsetView() argument 465 v.setAlpha(getAlpha(v, distance)); in offsetView() 467 v.setTranslationY(distance); in offsetView() 469 v.setTranslationX(distance); in offsetView() 473 private float getAlpha(View v, float distance) { in getAlpha() argument 474 return 1 - (float) Math.abs(distance) / (mHorizontal ? v.getHeight() : v.getWidth()); in getAlpha()
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/util/ |
D | LevenshteinDistance.java | 77 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/ |
D | Paper.java | 36 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()
|
D | ScrollerHelper.java | 85 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()
|
D | EdgeEffect.java | 198 float distance = Math.abs(mPullDistance); in onPull() local 200 mEdgeAlpha = mEdgeAlphaStart = Math.max(PULL_EDGE_BEGIN, Math.min(distance, MAX_ALPHA)); in onPull() 202 HELD_EDGE_SCALE_Y, Math.min(distance * PULL_DISTANCE_EDGE_FACTOR, 1.f)); in onPull()
|
/packages/apps/Launcher2/src/com/android/launcher2/ |
D | Workspace.java | 2007 float distance = dropTargetLayout.getDistanceFromCell(mDragViewVisualCenter[0], 2010 mTargetCell, distance, true)) { 2014 mTargetCell, distance)) { 2045 distance, boolean considerTimeout) { 2046 if (distance > mMaxDistanceForFolderCreation) return false; 2074 float distance) { 2075 if (distance > mMaxDistanceForFolderCreation) return false; 2095 int[] targetCell, float distance, boolean external, DragView dragView, 2097 if (distance > mMaxDistanceForFolderCreation) return false; 2148 float distance, DragObject d, boolean external) { [all …]
|
D | SmoothPagedView.java | 46 public void setDistance(int distance) { in setDistance() argument 47 mTension = distance > 0 ? DEFAULT_TENSION / distance : DEFAULT_TENSION; in setDistance()
|
/packages/apps/Calendar/src/com/android/calendar/ |
D | DayView.java | 3318 int distance = startTime - neighbor.endTime; in computeNeighbors() local 3319 if (distance < upDistanceMin) { in computeNeighbors() 3320 upDistanceMin = distance; in computeNeighbors() 3322 } else if (distance == upDistanceMin) { in computeNeighbors() 3340 upDistanceMin = distance; in computeNeighbors() 3349 int distance = neighbor.startTime - endTime; in computeNeighbors() local 3350 if (distance < downDistanceMin) { in computeNeighbors() 3351 downDistanceMin = distance; in computeNeighbors() 3353 } else if (distance == downDistanceMin) { in computeNeighbors() 3371 downDistanceMin = distance; in computeNeighbors() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/ |
D | KeyDetector.java | 103 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/apps/ExactCalculator/src/com/android/calculator2/ |
D | CalculatorResult.java | 139 int distance = (int)distanceX; in CalculatorResult() 147 if (mCurrentPos + distance < mMinPos) { in CalculatorResult() 148 distance = mMinPos - mCurrentPos; in CalculatorResult() 149 } else if (mCurrentPos + distance > mMaxPos) { in CalculatorResult() 150 distance = mMaxPos - mCurrentPos; in CalculatorResult() 154 mScroller.startScroll(mCurrentPos, 0, distance, 0, (int)duration); in CalculatorResult()
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
D | Workspace.java | 2428 float distance = dropTargetLayout.getDistanceFromCell(mDragViewVisualCenter[0], in acceptDrop() local 2431 dropTargetLayout, mTargetCell, distance, true)) { in acceptDrop() 2436 dropTargetLayout, mTargetCell, distance)) { in acceptDrop() 2473 distance, boolean considerTimeout) { in willCreateUserFolder() argument 2474 if (distance > mMaxDistanceForFolderCreation) return false; in willCreateUserFolder() 2502 float distance) { in willAddToExistingUserFolder() argument 2503 if (distance > mMaxDistanceForFolderCreation) return false; in willAddToExistingUserFolder() 2523 int[] targetCell, float distance, boolean external, DragView dragView, in createUserFolderIfNecessary() argument 2525 if (distance > mMaxDistanceForFolderCreation) return false; in createUserFolderIfNecessary() 2576 float distance, DragObject d, boolean external) { in addToExistingFolderIfNecessary() argument [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | LocationClustering.java | 255 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/Calendar/src/com/android/calendar/agenda/ |
D | AgendaByDayAdapter.java | 545 long distance = Math.abs(millis - row.mEventStartTimeMilli); in findEventPositionNearestTime() local 546 if (distance < idFoundMinDistance) { in findEventPositionNearestTime() 547 idFoundMinDistance = distance; in findEventPositionNearestTime() 565 long distance = Math.abs(millis - row.mEventStartTimeMilli); in findEventPositionNearestTime() local 566 if (distance < minDistance) { in findEventPositionNearestTime() 567 minDistance = distance; in findEventPositionNearestTime()
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/result/ |
D | suggestions_output_utils.cpp | 205 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/ |
D | autocorrection_threshold_utils.cpp | 75 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/QuickSearchBox/tests/src/com/android/quicksearchbox/util/ |
D | LevenshteinDistanceTest.java | 43 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/ContactsCommon/src/com/android/contacts/common/util/ |
D | MaterialColorMapUtils.java | 121 final float distance = Math.abs(comparedHue - colorHue); in calculatePrimaryAndSecondaryColor() local 122 if (distance < minimumDistance) { in calculatePrimaryAndSecondaryColor() 123 minimumDistance = distance; in calculatePrimaryAndSecondaryColor()
|
/packages/apps/Gallery2/src/com/android/gallery3d/app/ |
D | EyePosition.java | 146 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/ |
D | PhotoTouchListener.java | 208 double distance = Math.hypot(x0 - mInitialTouchX, in onTouch() local 211 if (distance < mTouchSlop) { in onTouch() 221 distance < mTouchSlop) { in onTouch()
|
/packages/apps/DeskClock/src/com/android/deskclock/ |
D | AlarmClockFragment.java | 1200 final int distance = endingHeight - startingHeight; in expandAlarm() 1213 expandParams.setMargins(0, -distance, 0, collapseHeight); in expandAlarm() 1227 (int) (value * distance + startingHeight); in expandAlarm() 1231 0, (int) -((1 - value) * distance), 0, collapseHeight); in expandAlarm() 1316 final int distance = endingHeight - startingHeight; in collapseAlarm() 1335 (int) (value * distance + startingHeight); in collapseAlarm() 1339 0, (int) (value * distance), 0, mCollapseExpandHeight); in collapseAlarm()
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/aggregation/util/ |
D | ContactMatcher.java | 229 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()
|
D | RawContactMatcher.java | 227 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()
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/ |
D | FilterShowActivity.java | 1451 float distance = mHandledSwipeView.getHeight(); in dispatchTouchEvent() local 1455 distance = mHandledSwipeView.getWidth(); in dispatchTouchEvent() 1460 float transparency = Math.min(1, delta / distance); in dispatchTouchEvent() 1470 float distance = mHandledSwipeView.getHeight(); in dispatchTouchEvent() local 1472 distance = mHandledSwipeView.getWidth(); in dispatchTouchEvent() 1474 if (mHandledSwipeViewLastDelta > distance) { in dispatchTouchEvent()
|