/frameworks/base/core/java/com/android/internal/widget/ |
D | AutoScrollHelper.java | 555 return constrain(value * targetVelocity, minimumVelocity, maximumVelocity); in computeTargetVelocity() 557 return -constrain(-value * targetVelocity, minimumVelocity, maximumVelocity); in computeTargetVelocity() 606 final float edgeSize = constrain(relativeValue * size, NO_MIN, maxValue); in getEdgeValue() 619 return constrain(interpolated, -1, 1); in getEdgeValue() 651 private static int constrain(int value, int min, int max) { in constrain() method in AutoScrollHelper 661 private static float constrain(float value, float min, float max) { in constrain() method in AutoScrollHelper 775 mEffectiveRampDown = constrain((int) (currentTime - mStartTime), 0, mRampDownDuration); in requestStop() 790 return 0.5f * constrain(elapsedSinceStart / (float) mRampUpDuration, 0, 1); in getValueAt() 794 * constrain(elapsedSinceEnd / (float) mEffectiveRampDown, 0, 1); in getValueAt()
|
/frameworks/base/core/java/com/android/internal/graphics/ |
D | ColorUtils.java | 248 outHsl[0] = constrain(h, 0f, 360f); in RGBToHSL() 249 outHsl[1] = constrain(s, 0f, 1f); in RGBToHSL() 250 outHsl[2] = constrain(l, 0f, 1f); in RGBToHSL() 328 r = constrain(r, 0, 255); in HSLToColor() 329 g = constrain(g, 0, 255); in HSLToColor() 330 b = constrain(b, 0, 255); in HSLToColor() 529 constrain((int) Math.round(r * 255), 0, 255), in XYZToColor() 530 constrain((int) Math.round(g * 255), 0, 255), in XYZToColor() 531 constrain((int) Math.round(b * 255), 0, 255)); in XYZToColor() 560 private static float constrain(float amount, float low, float high) { in constrain() method [all …]
|
/frameworks/base/core/java/android/util/ |
D | MathUtils.java | 40 public static int constrain(int amount, int low, int high) { in constrain() method in MathUtils 44 public static long constrain(long amount, long low, long high) { in constrain() method in MathUtils 49 public static float constrain(float amount, float low, float high) { in constrain() method in MathUtils 180 return constrain(value, 0.0f, 1.0f); in saturate() 255 return constrain((x - start) / (end - start), 0f, 1f); in smoothStep()
|
/frameworks/base/core/java/com/android/internal/util/ |
D | ContrastColorUtil.java | 899 constrain((int) Math.round(r * 255), 0, 255), in XYZToColor() 900 constrain((int) Math.round(g * 255), 0, 255), in XYZToColor() 901 constrain((int) Math.round(b * 255), 0, 255)); in XYZToColor() 921 private static int constrain(int amount, int low, int high) { in constrain() method in ContrastColorUtil.ColorUtilsFromCompat 925 private static float constrain(float amount, float low, float high) { in constrain() method in ContrastColorUtil.ColorUtilsFromCompat 1004 r = constrain(r, 0, 255); in HSLToColor() 1005 g = constrain(g, 0, 255); in HSLToColor() 1006 b = constrain(b, 0, 255); in HSLToColor() 1073 outHsl[0] = constrain(h, 0f, 360f); in RGBToHSL() 1074 outHsl[1] = constrain(s, 0f, 1f); in RGBToHSL() [all …]
|
D | ProgressReporter.java | 147 + MathUtils.constrain((n * mSegmentRange[1]) / m, 0, mSegmentRange[1]); in setProgress()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/display/ |
D | DisplayDensityUtils.java | 110 final int numLarger = (int) MathUtils.constrain((maxScale - 1) / MIN_SCALE_INTERVAL, in DisplayDensityUtils() 112 final int numSmaller = (int) MathUtils.constrain((1 - minScale) / MIN_SCALE_INTERVAL, in DisplayDensityUtils()
|
D | BrightnessUtils.java | 88 final float normalizedRet = MathUtils.constrain(ret, 0, 12); in convertGammaToLinearFloat()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/ |
D | MirrorWindowControl.java | 171 point.x = MathUtils.constrain(point.x, mDraggableBound.left, mDraggableBound.right); in constrainFrameToDraggableBound() 172 point.y = MathUtils.constrain(point.y, mDraggableBound.top, mDraggableBound.bottom); in constrainFrameToDraggableBound()
|
/frameworks/base/core/java/android/hardware/display/ |
D | BrightnessCorrection.java | 226 mScale = MathUtils.constrain(scale, MIN_SCALE, MAX_SCALE); in ScaleAndTranslateLog() 227 mTranslate = MathUtils.constrain(translate, MIN_TRANSLATE, MAX_TRANSLATE); in ScaleAndTranslateLog()
|
/frameworks/base/services/core/java/com/android/server/display/ |
D | BrightnessMappingStrategy.java | 412 float newBrightness = MathUtils.constrain( in smoothCurve() 428 float newBrightness = MathUtils.constrain( in smoothCurve() 468 adjustment = MathUtils.constrain(adjustment, -1, +1); in inferAutoBrightnessAdjustment() 485 adjustment = MathUtils.constrain(adjustment, -1, 1); in getAdjustedCurve() 591 adjustment = MathUtils.constrain(adjustment, -1, 1); in setAutoBrightnessAdjustment() 801 adjustment = MathUtils.constrain(adjustment, -1, 1); in setAutoBrightnessAdjustment()
|
D | DisplayPowerController.java | 1313 return MathUtils.constrain( in clampScreenBrightnessForVr() 1322 return MathUtils.constrain( in clampScreenBrightness() 1909 return MathUtils.constrain(value, PowerManager.BRIGHTNESS_OFF, PowerManager.BRIGHTNESS_ON); in clampAbsoluteBrightness() 1913 return MathUtils.constrain(value, PowerManager.BRIGHTNESS_MIN, in clampAbsoluteBrightness() 1918 return MathUtils.constrain(value, -1.0f, 1.0f); in clampAutoBrightnessAdjustment()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/ |
D | TouchAnimator.java | 56 float t = MathUtils.constrain((fraction - mStartDelay) / mSpan, 0, 1); in setPosition() 212 int i = MathUtils.constrain((int) Math.ceil(fraction / mFrameWidth), 1, mSize - 1); in setValue()
|
/frameworks/base/core/java/android/widget/ |
D | TextInputTimePickerView.java | 236 MathUtils.constrain(hour, minHour, maxHour))); in parseAndSetHourInternal() 252 mListener.onValueChanged(MINUTES, MathUtils.constrain(minutes, 0, 59)); in parseAndSetMinuteInternal()
|
D | TimePicker.java | 186 mDelegate.setHour(MathUtils.constrain(hour, 0, 23)); in setHour() 207 mDelegate.setMinute(MathUtils.constrain(minute, 0, 59)); in setMinute()
|
D | DayPickerView.java | 165 final long setDateMillis = MathUtils.constrain( in DayPickerView() 392 return MathUtils.constrain(diffMonth, 0, diffMonthMax);
|
D | SimpleMonthView.java | 540 row = MathUtils.constrain(row, 0, maxRows); in findClosestRow() 557 MathUtils.constrain(centerX / mCellWidth, 0, DAYS_IN_WEEK - 1); in findClosestColumn() 828 mEnabledDayStart = MathUtils.constrain(enabledDayStart, 1, mDaysInMonth); in setMonthParams() 829 mEnabledDayEnd = MathUtils.constrain(enabledDayEnd, mEnabledDayStart, mDaysInMonth); in setMonthParams()
|
D | FastScroller.java | 1010 final int exactSection = MathUtils.constrain( in scrollTo() 1078 targetIndex = MathUtils.constrain(targetIndex, 0, count - 1); in scrollTo() 1091 final int index = MathUtils.constrain((int) (position * count), 0, count - 1); in scrollTo() 1235 final float previewMiddle = MathUtils.constrain(previewPos, minP, maxP); in setThumbPos() 1250 return MathUtils.constrain((y - mThumbOffset) / mThumbRange, 0f, 1f); in getPosFromMotionEvent()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/animation/ |
D | TransitionLayoutController.kt | 103 remappedProgress = MathUtils.constrain(remappedProgress, 0.0f, 1.0f) in getGoneState() 121 alpha = MathUtils.constrain(alphaProgress, 0.0f, 1.0f) in getGoneState()
|
/frameworks/base/services/accessibility/java/com/android/server/accessibility/ |
D | MagnificationController.java | 429 scale = MathUtils.constrain(scale, MIN_SCALE, MAX_SCALE); in setScale() 496 final float normScale = MathUtils.constrain(scale, MIN_SCALE, MAX_SCALE); in updateMagnificationSpecLocked() 539 final float offsetX = MathUtils.constrain( in updateCurrentSpecWithOffsetsLocked() 545 final float offsetY = MathUtils.constrain( in updateCurrentSpecWithOffsetsLocked()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/ |
D | IlluminationDrawable.kt | 137 tmpHsl[2] = MathUtils.constrain(if (L < 1f - highlight) { in animateBackground()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | DozeParameters.java | 199 return MathUtils.constrain(value, 0, MAX_DURATION); in getInt()
|
D | NavigationBarEdgePanel.java | 749 float progress = MathUtils.constrain( in handleMoveEvent() 762 mLayoutParams.y = MathUtils.constrain((int) position, 0, mDisplaySize.y); in updatePosition()
|
/frameworks/base/services/core/java/com/android/server/ |
D | RescueParty.java | 228 return MathUtils.constrain(SystemProperties.getInt(PROP_RESCUE_LEVEL, LEVEL_NONE) + 1, in getNextRescueLevel() 359 int rescueLevel = MathUtils.constrain( in shouldPerformScopedResets()
|
/frameworks/base/graphics/java/android/graphics/drawable/ |
D | ColorStateListDrawable.java | 151 color = (color & 0xFFFFFF) | MathUtils.constrain(mState.mAlpha, 0, 255) << 24; in onStateChange()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
D | ActivityLaunchAnimator.java | 353 return MathUtils.constrain((linearProgress * ANIMATION_DURATION - delay) in getProgress()
|