Home
last modified time | relevance | path

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

1234

/aosp12/packages/providers/MediaProvider/src/com/android/providers/media/playlist/
H A DPlaylist.java84 index = constrain(index, 0, size); in add()
97 from = constrain(from, 0, size - 1); in move()
98 to = constrain(to, 0, size - 1); in move()
111 index = constrain(index, 0, size - 1); in remove()
139 private static int constrain(int amount, int low, int high) { in constrain() method in Playlist
/aosp12/frameworks/base/core/java/com/android/internal/widget/
H A 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()
/aosp12/packages/apps/TV/src/com/android/tv/menu/
H A DPlaybackProgressBar.java101 start = constrain(start, 0, mMax); in setProgressRange()
102 end = constrain(end, start, mMax); in setProgressRange()
103 mProgress = constrain(mProgress, start, end); in setProgressRange()
113 progress = constrain(progress, mProgressStart, mProgressEnd); in setProgress()
120 private long constrain(long value, long min, long max) { in constrain() method in PlaybackProgressBar
/aosp12/frameworks/base/core/java/com/android/internal/graphics/
H A DColorUtils.java250 outHsl[0] = constrain(h, 0f, 360f); in RGBToHSL()
251 outHsl[1] = constrain(s, 0f, 1f); in RGBToHSL()
252 outHsl[2] = constrain(l, 0f, 1f); in RGBToHSL()
330 r = constrain(r, 0, 255); in HSLToColor()
331 g = constrain(g, 0, 255); in HSLToColor()
332 b = constrain(b, 0, 255); in HSLToColor()
560 constrain((int) Math.round(r * 255), 0, 255), in XYZToColor()
561 constrain((int) Math.round(g * 255), 0, 255), in XYZToColor()
562 constrain((int) Math.round(b * 255), 0, 255)); in XYZToColor()
591 private static float constrain(float amount, float low, float high) { in constrain() method
[all …]
/aosp12/frameworks/base/core/java/android/util/
H A DMathUtils.java40 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
184 return constrain(value, 0.0f, 1.0f); in saturate()
259 return constrain((x - start) / (end - start), 0f, 1f); in smoothStep()
/aosp12/frameworks/base/core/java/com/android/internal/util/
H A DContrastColorUtil.java903 constrain((int) Math.round(r * 255), 0, 255), in XYZToColor()
904 constrain((int) Math.round(g * 255), 0, 255), in XYZToColor()
905 constrain((int) Math.round(b * 255), 0, 255)); in XYZToColor()
925 private static int constrain(int amount, int low, int high) { in constrain() method in ContrastColorUtil.ColorUtilsFromCompat
929 private static float constrain(float amount, float low, float high) { in constrain() method in ContrastColorUtil.ColorUtilsFromCompat
1008 r = constrain(r, 0, 255); in HSLToColor()
1009 g = constrain(g, 0, 255); in HSLToColor()
1010 b = constrain(b, 0, 255); in HSLToColor()
1077 outHsl[0] = constrain(h, 0f, 360f); in RGBToHSL()
1078 outHsl[1] = constrain(s, 0f, 1f); in RGBToHSL()
[all …]
/aosp12/frameworks/base/core/java/com/android/internal/view/
H A DWebViewCaptureHelper.java19 import static android.util.MathUtils.constrain;
79 int scrollMovement = constrain(scrollToCenter, upLimit, downLimit); in onScrollRequested()
/aosp12/frameworks/base/services/core/java/com/android/server/display/
H A DBrightnessMappingStrategy.java405 float newBrightness = MathUtils.constrain( in smoothCurve()
421 float newBrightness = MathUtils.constrain( in smoothCurve()
460 adjustment = MathUtils.constrain(adjustment, -1, +1); in inferAutoBrightnessAdjustment()
477 adjustment = MathUtils.constrain(adjustment, -1, 1); in getAdjustedCurve()
583 adjustment = MathUtils.constrain(adjustment, -1, 1); in setAutoBrightnessAdjustment()
799 adjustment = MathUtils.constrain(adjustment, -1, 1); in setAutoBrightnessAdjustment()
H A DBrightnessUtils.java59 final float normalizedRet = MathUtils.constrain(ret, 0, 12); in convertGammaToLinear()
/aosp12/frameworks/base/core/java/android/hardware/display/
H A DBrightnessCorrection.java219 mScale = MathUtils.constrain(scale, MIN_SCALE, MAX_SCALE); in ScaleAndTranslateLog()
220 mTranslate = MathUtils.constrain(translate, MIN_TRANSLATE, MAX_TRANSLATE); in ScaleAndTranslateLog()
/aosp12/frameworks/base/packages/SettingsLib/src/com/android/settingslib/display/
H A DDisplayDensityUtils.java110 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()
H A DBrightnessUtils.java88 final float normalizedRet = MathUtils.constrain(ret, 0, 12); in convertGammaToLinearFloat()
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/
H A 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()
/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/screenshot/
H A DFakeSession.java19 import static android.util.MathUtils.constrain;
124 mScrollDelta = constrain(mScrollDelta, mAvailableTop.top, mAvailableTop.bottom); in requestTile()
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
H A DNotificationShadeDepthController.kt182 val animationRadius = MathUtils.constrain(shadeAnimation.radius,
328 deltaTime = MathUtils.constrain(
334 val shadeVelocity = MathUtils.constrain(
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/
H A DTouchAnimator.java57 float t = MathUtils.constrain((fraction - mStartDelay) / mSpan, 0, 1); in setPosition()
213 int i = MathUtils.constrain((int) Math.ceil(fraction / mFrameWidth), 1, mSize - 1); in setValue()
/aosp12/packages/apps/Settings/src/com/android/settings/deviceinfo/
H A DStorageSummaryPreference.java42 mPercent = MathUtils.constrain((int) ((usedBytes * 100) / totalBytes), in setPercent()
/aosp12/frameworks/base/core/java/android/widget/
H A DTextInputTimePickerView.java236 MathUtils.constrain(hour, minHour, maxHour))); in parseAndSetHourInternal()
252 mListener.onValueChanged(MINUTES, MathUtils.constrain(minutes, 0, 59)); in parseAndSetMinuteInternal()
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/screenrecord/
H A DScreenInternalAudioRecorder.java219 buff[i] = (short) MathUtils.constrain(newValue, Short.MIN_VALUE, Short.MAX_VALUE); in scaleValues()
226 sum = (short) MathUtils.constrain( in addAndConvertBuffers()
/aosp12/system/sepolicy/prebuilts/api/26.0/private/
H A Dmls54 # Only constrain open, not read/write.
55 # Also constrain other forms of manipulation, e.g. chmod/chown, unlink, rename, etc.
/aosp12/system/sepolicy/prebuilts/api/27.0/private/
H A Dmls54 # Only constrain open, not read/write.
55 # Also constrain other forms of manipulation, e.g. chmod/chown, unlink, rename, etc.
/aosp12/system/sepolicy/prebuilts/api/28.0/private/
H A Dmls54 # Only constrain open, not read/write.
55 # Also constrain other forms of manipulation, e.g. chmod/chown, unlink, rename, etc.
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/util/animation/
H A DTransitionLayoutController.kt102 remappedProgress = MathUtils.constrain(remappedProgress, 0.0f, 1.0f)
120 alpha = MathUtils.constrain(alphaProgress, 0.0f, 1.0f)
/aosp12/system/sepolicy/prebuilts/api/30.0/private/
H A Dmls54 # Only constrain open, not read/write.
55 # Also constrain other forms of manipulation, e.g. chmod/chown, unlink, rename, etc.
/aosp12/system/sepolicy/prebuilts/api/29.0/private/
H A Dmls54 # Only constrain open, not read/write.
55 # Also constrain other forms of manipulation, e.g. chmod/chown, unlink, rename, etc.

1234