Home
last modified time | relevance | path

Searched refs:constrain (Results 1 – 25 of 74) sorted by relevance

123

/frameworks/base/packages/SystemUI/src/com/android/keyguard/
DBouncerPanelExpansionCalculator.kt39 return MathUtils.constrain((fraction - 0.9f) / 0.1f, 0f, 1f) in aboutToShowBouncerProgress()
47 return MathUtils.constrain((fraction - 0.7f) / 0.3f, 0f, 1f) in getKeyguardClockScaledExpansion()
67 return MathUtils.constrain((fraction - 0.94f) / 0.06f, 0f, 1f) in getDreamAlphaScaledExpansion()
/frameworks/base/core/java/com/android/internal/widget/
DAutoScrollHelper.java555 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/
DColorUtils.java253 outHsl[0] = constrain(h, 0f, 360f); in RGBToHSL()
254 outHsl[1] = constrain(s, 0f, 1f); in RGBToHSL()
255 outHsl[2] = constrain(l, 0f, 1f); in RGBToHSL()
333 r = constrain(r, 0, 255); in HSLToColor()
334 g = constrain(g, 0, 255); in HSLToColor()
335 b = constrain(b, 0, 255); in HSLToColor()
563 constrain((int) Math.round(r * 255), 0, 255), in XYZToColor()
564 constrain((int) Math.round(g * 255), 0, 255), in XYZToColor()
565 constrain((int) Math.round(b * 255), 0, 255)); in XYZToColor()
594 private static float constrain(float amount, float low, float high) { in constrain() method
[all …]
/frameworks/base/core/java/android/util/
DMathUtils.java41 public static int constrain(int amount, int low, int high) { in constrain() method in MathUtils
45 public static long constrain(long amount, long low, long high) { in constrain() method in MathUtils
50 public static float constrain(float amount, float low, float high) { in constrain() method in MathUtils
185 return constrain(value, 0.0f, 1.0f); in saturate()
260 return constrain((x - start) / (end - start), 0f, 1f); in smoothStep()
/frameworks/base/services/core/java/com/android/server/display/brightness/
DBrightnessUtils.java40 return MathUtils.constrain(value, PowerManager.BRIGHTNESS_MIN, in clampAbsoluteBrightness()
48 return MathUtils.constrain(value, -1.0f, 1.0f); in clampBrightnessAdjustment()
/frameworks/base/core/java/com/android/internal/view/
DWebViewCaptureHelper.java19 import static android.util.MathUtils.constrain;
83 int scrollMovement = constrain(scrollToCenter, upLimit, downLimit); in onScrollRequested()
/frameworks/base/core/java/com/android/internal/util/
DContrastColorUtil.java991 constrain((int) Math.round(r * 255), 0, 255), in XYZToColor()
992 constrain((int) Math.round(g * 255), 0, 255), in XYZToColor()
993 constrain((int) Math.round(b * 255), 0, 255)); in XYZToColor()
1013 private static int constrain(int amount, int low, int high) { in constrain() method in ContrastColorUtil.ColorUtilsFromCompat
1017 private static float constrain(float amount, float low, float high) { in constrain() method in ContrastColorUtil.ColorUtilsFromCompat
1096 r = constrain(r, 0, 255); in HSLToColor()
1097 g = constrain(g, 0, 255); in HSLToColor()
1098 b = constrain(b, 0, 255); in HSLToColor()
1165 outHsl[0] = constrain(h, 0f, 360f); in RGBToHSL()
1166 outHsl[1] = constrain(s, 0f, 1f); in RGBToHSL()
[all …]
DProgressReporter.java148 + MathUtils.constrain((n * mSegmentRange[1]) / m, 0, mSegmentRange[1]); in setProgress()
/frameworks/base/core/java/com/android/internal/display/
DBrightnessUtils.java59 final float normalizedRet = MathUtils.constrain(ret, 0, 12); in convertGammaToLinear()
/frameworks/base/core/java/android/hardware/display/
DBrightnessCorrection.java219 mScale = MathUtils.constrain(scale, MIN_SCALE, MAX_SCALE); in ScaleAndTranslateLog()
220 mTranslate = MathUtils.constrain(translate, MIN_TRANSLATE, MAX_TRANSLATE); in ScaleAndTranslateLog()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/screenshot/scroll/
DFakeSession.java19 import static android.util.MathUtils.constrain;
124 mScrollDelta = constrain(mScrollDelta, mAvailableTop.top, mAvailableTop.bottom); in requestTile()
/frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/
DMirrorWindowControl.java167 point.x = MathUtils.constrain(point.x, mDraggableBound.left, mDraggableBound.right); in constrainFrameToDraggableBound()
168 point.y = MathUtils.constrain(point.y, mDraggableBound.top, mDraggableBound.bottom); in constrainFrameToDraggableBound()
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DUtil.java70 return MathUtils.constrain(targetRangeStart + valueFraction * targetRangeLength, in translateToRange()
/frameworks/base/packages/SystemUI/compose/core/src/com/android/compose/modifiers/
DSize.kt32 import androidx.compose.ui.unit.constrain in <lambda>()
149 constraints.constrain(targetConstraints) in measure()
/frameworks/base/packages/SettingsLib/DisplayUtils/src/com/android/settingslib/display/
DBrightnessUtils.java89 final float normalizedRet = MathUtils.constrain(ret, 0, 12); in convertGammaToLinearFloat()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/
DTouchAnimator.java66 float t = MathUtils.constrain((fraction - mStartDelay) / mSpan, 0, 1); in setPosition()
225 int i = MathUtils.constrain((int) Math.ceil(fraction / mFrameWidth), 1, mSize - 1); in setValue()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/display/
DDisplayDensityUtils.java156 final int numLarger = (int) MathUtils.constrain((maxScale - 1) / minScaleInterval, in DisplayDensityUtils()
158 final int numSmaller = (int) MathUtils.constrain((1 - minScale) / minScaleInterval, in DisplayDensityUtils()
/frameworks/base/core/java/android/widget/
DTextInputTimePickerView.java236 MathUtils.constrain(hour, minHour, maxHour))); in parseAndSetHourInternal()
252 mListener.onValueChanged(MINUTES, MathUtils.constrain(minutes, 0, 59)); in parseAndSetMinuteInternal()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DNotificationShadeDepthController.kt194 val animationRadius = MathUtils.constrain(shadeAnimation.radius, in <lambda>()
363 deltaTime = MathUtils.constrain( in <lambda>()
369 val shadeVelocity = MathUtils.constrain( in <lambda>()
/frameworks/base/services/accessibility/java/com/android/server/accessibility/magnification/
DMagnificationScaleProvider.java141 return MathUtils.constrain(scale, SCALE_MIN_VALUE, SCALE_MAX_VALUE); in constrainScale()
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenrecord/
DScreenInternalAudioRecorder.java219 buff[i] = (short) MathUtils.constrain(newValue, Short.MIN_VALUE, Short.MAX_VALUE); in scaleValues()
226 sum = (short) MathUtils.constrain( in addAndConvertBuffers()
/frameworks/base/services/core/java/com/android/server/display/
DBrightnessMappingStrategy.java484 float newBrightness = MathUtils.constrain( in smoothCurve()
500 float newBrightness = MathUtils.constrain( in smoothCurve()
539 adjustment = MathUtils.constrain(adjustment, -1, +1); in inferAutoBrightnessAdjustment()
556 adjustment = MathUtils.constrain(adjustment, -1, 1); in getAdjustedCurve()
666 adjustment = MathUtils.constrain(adjustment, -1, 1); in setAutoBrightnessAdjustment()
941 adjustment = MathUtils.constrain(adjustment, -1, 1); in setAutoBrightnessAdjustment()
/frameworks/base/packages/SystemUI/src/com/android/systemui/wallpapers/
DWallpaperLocalColorExtractor.java404 imgArea.left = MathUtils.constrain( in pageToImgRect()
406 imgArea.right = MathUtils.constrain( in pageToImgRect()
/frameworks/base/core/java/android/text/method/
DInsertModeTransformationMethod.java288 final int seg2Start = MathUtils.constrain(start - mEnd, 0, placeholderLength); in subSequence()
289 final int seg2End = MathUtils.constrain(end - mEnd, 0, placeholderLength); in subSequence()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/animation/
DTransitionLayoutController.kt113 remappedProgress = MathUtils.constrain(remappedProgress, 0.0f, 1.0f) in getGoneState()
131 alpha = MathUtils.constrain(alphaProgress, 0.0f, 1.0f) in getGoneState()

123