/aosp12/packages/providers/MediaProvider/src/com/android/providers/media/playlist/ |
H A D | Playlist.java | 84 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 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()
|
/aosp12/packages/apps/TV/src/com/android/tv/menu/ |
H A D | PlaybackProgressBar.java | 101 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 D | ColorUtils.java | 250 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 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 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 D | ContrastColorUtil.java | 903 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 D | WebViewCaptureHelper.java | 19 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 D | BrightnessMappingStrategy.java | 405 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 D | BrightnessUtils.java | 59 final float normalizedRet = MathUtils.constrain(ret, 0, 12); in convertGammaToLinear()
|
/aosp12/frameworks/base/core/java/android/hardware/display/ |
H A D | BrightnessCorrection.java | 219 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 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()
|
H A D | BrightnessUtils.java | 88 final float normalizedRet = MathUtils.constrain(ret, 0, 12); in convertGammaToLinearFloat()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/ |
H A D | MirrorWindowControl.java | 167 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 D | FakeSession.java | 19 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 D | NotificationShadeDepthController.kt | 182 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 D | TouchAnimator.java | 57 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 D | StorageSummaryPreference.java | 42 mPercent = MathUtils.constrain((int) ((usedBytes * 100) / totalBytes), in setPercent()
|
/aosp12/frameworks/base/core/java/android/widget/ |
H A D | TextInputTimePickerView.java | 236 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 D | ScreenInternalAudioRecorder.java | 219 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 D | mls | 54 # 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 D | mls | 54 # 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 D | mls | 54 # 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 D | TransitionLayoutController.kt | 102 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 D | mls | 54 # 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 D | mls | 54 # Only constrain open, not read/write. 55 # Also constrain other forms of manipulation, e.g. chmod/chown, unlink, rename, etc.
|