/aosp14/frameworks/base/core/java/android/util/ |
H A D | MathUtils.java | 40 public static int constrain(int amount, int low, int high) { in constrain() argument 41 return amount < low ? low : (amount > high ? high : amount); in constrain() 44 public static long constrain(long amount, long low, long high) { in constrain() argument 45 return amount < low ? low : (amount > high ? high : amount); in constrain() 49 public static float constrain(float amount, float low, float high) { in constrain() argument 50 return amount < low ? low : (amount > high ? high : amount); in constrain() 164 public static float lerp(float start, float stop, float amount) { in lerp() argument 165 return start + (stop - start) * amount; in lerp() 168 public static float lerp(int start, int stop, float amount) { in lerp() argument 169 return lerp((float) start, (float) stop, amount); in lerp() [all …]
|
/aosp14/frameworks/base/native/graphics/jni/ |
H A D | aassetstreamadaptor.cpp | 83 ssize_t amount; in read() local 103 amount = newOffset - oldOffset; in read() 105 amount = AAsset_read(mAAsset, buffer, size); in read() 108 if (amount < 0) { in read() 109 amount = 0; in read() 111 return amount; in read()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
H A D | NotificationUtils.java | 50 public static float interpolate(float start, float end, float amount) { in interpolate() argument 51 return start * (1.0f - amount) + end * amount; in interpolate() 54 public static int interpolateColors(int startColor, int endColor, float amount) { in interpolateColors() argument 56 (int) interpolate(Color.alpha(startColor), Color.alpha(endColor), amount), in interpolateColors() 57 (int) interpolate(Color.red(startColor), Color.red(endColor), amount), in interpolateColors() 58 (int) interpolate(Color.green(startColor), Color.green(endColor), amount), in interpolateColors() 59 (int) interpolate(Color.blue(startColor), Color.blue(endColor), amount)); in interpolateColors()
|
/aosp14/system/core/libstats/expresslog/ |
H A D | Counter.cpp | 26 void Counter::logIncrement(const char* metricName, int64_t amount) { in logIncrement() argument 28 stats_write(EXPRESS_EVENT_REPORTED, metricIdHash, amount); in logIncrement() 31 void Counter::logIncrementWithUid(const char* metricName, int32_t uid, int64_t amount) { in logIncrementWithUid() argument 33 stats_write(EXPRESS_UID_EVENT_REPORTED, metricIdHash, amount, uid); in logIncrementWithUid()
|
/aosp14/frameworks/base/libs/hwui/jni/ |
H A D | Utils.cpp | 89 ssize_t amount; in read() local 108 amount = newOffset - oldOffset; in read() 110 amount = fAsset->read(buffer, size); in read() 113 if (amount < 0) { in read() 114 amount = 0; in read() 116 return amount; in read()
|
H A D | CreateJavaOutputStreamAdaptor.cpp | 73 size_t amount = this->doSkip(size - amountSkipped, env); in read() local 74 if (0 == amount) { in read() 76 amount = this->doRead(&tmp, 1, env); in read() 77 if (0 == amount) { in read() 83 amountSkipped += amount; in read()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
H A D | LightRevealScrim.kt | 33 fun setRevealAmountOnScrim(amount: Float, scrim: LightRevealScrim) 72 override fun setRevealAmountOnScrim(amount: Float, scrim: LightRevealScrim) { 73 val interpolatedAmount = INTERPOLATOR.getInterpolation(amount) 81 1f - getPercentPastThreshold(amount, FADE_END_COLOR_OUT_THRESHOLD) 103 override fun setRevealAmountOnScrim(amount: Float, scrim: LightRevealScrim) { 104 val interpolatedAmount = interpolator.getInterpolation(amount) 168 override fun setRevealAmountOnScrim(amount: Float, scrim: LightRevealScrim) { 171 val fadeAmount = getPercentPastThreshold(amount, 0.5f) 172 val radius = startRadius + ((endRadius - startRadius) * amount) 173 scrim.interpolatedRevealAmount = amount [all …]
|
/aosp14/frameworks/base/core/java/android/util/proto/ |
H A D | EncodedBuffer.java | 172 public void skipRead(int amount) { in skipRead() argument 173 if (amount < 0) { in skipRead() 174 throw new RuntimeException("skipRead with negative amount=" + amount); in skipRead() 176 if (amount == 0) { in skipRead() 179 if (amount <= mChunkSize - mReadIndex) { in skipRead() 180 mReadIndex += amount; in skipRead() 182 amount -= mChunkSize - mReadIndex; in skipRead() 183 mReadIndex = amount % mChunkSize; in skipRead() 186 mReadBufIndex += (amount / mChunkSize); in skipRead() 188 mReadBufIndex += 1 + (amount / mChunkSize); in skipRead()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/touch/ |
H A D | OverScroll.java | 44 public static int dampedScroll(float amount, int max) { in dampedScroll() argument 45 if (Float.compare(amount, 0) == 0) return 0; in dampedScroll() 47 float f = amount / max; in dampedScroll()
|
/aosp14/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/ |
H A D | OverScroll.java | 44 public static int dampedScroll(float amount, int max) { in dampedScroll() argument 45 if (Float.compare(amount, 0) == 0) return 0; in dampedScroll() 47 float f = amount / max; in dampedScroll()
|
/aosp14/frameworks/base/tools/aapt2/text/ |
H A D | Utf8Iterator.cpp | 50 void Utf8Iterator::Skip(int amount) { in Skip() argument 51 while (amount > 0 && HasNext()) { in Skip() 53 --amount; in Skip()
|
/aosp14/frameworks/base/services/core/java/com/android/server/uri/ |
H A D | UriMetricsHelper.java | 60 void reportPersistentUriFlushed(int amount) { in reportPersistentUriFlushed() argument 63 amount in reportPersistentUriFlushed() 86 final int amount = perUidCount.valueAt(i); in reportPersistentUriPermissionsPerPackage() local 92 amount in reportPersistentUriPermissionsPerPackage()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/ |
H A D | TouchAnimator.java | 226 float amount = (fraction - mFrameWidth * (i - 1)) / mFrameWidth; in setValue() local 227 interpolate(i, amount, target); in setValue() 230 protected abstract void interpolate(int index, float amount, Object target); in interpolate() argument 252 protected void interpolate(int index, float amount, Object target) { in interpolate() argument 255 mProperty.set((T) target, firstFloat + (secondFloat - firstFloat) * amount); in interpolate() 270 protected void interpolate(int index, float amount, Object target) { in interpolate() argument 273 mProperty.set((T) target, (int) (firstFloat + (secondFloat - firstFloat) * amount)); in interpolate()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/ |
H A D | BackPanel.kt | 258 fun stretchBy(finalPosition: Float?, amount: Float) { 259 val stretchedAmount = amount * ((finalPosition ?: 0f) - restingPosition) 329 amount = horizontalTranslationStretchAmount 333 amount = arrowStretchAmount 337 amount = arrowStretchAmount 341 amount = arrowAlphaStretchAmount 345 amount = backgroundAlphaStretchAmount 349 amount = backgroundWidthStretchAmount 353 amount = backgroundHeightStretchAmount 357 amount = edgeCornerStretchAmount [all …]
|
/aosp14/system/core/libutils/ |
H A D | VectorImpl.cpp | 375 void* VectorImpl::_grow(size_t where, size_t amount) in _grow() argument 382 this, (int)where, (int)amount, (int)mCount); // caller already checked in _grow() 385 LOG_ALWAYS_FATAL_IF(__builtin_add_overflow(mCount, amount, &new_size), "new_size overflow"); in _grow() 429 void* dest = reinterpret_cast<uint8_t *>(array) + (where+amount)*mItemSize; in _grow() 442 void* to = reinterpret_cast<uint8_t *>(array) + (where+amount)*mItemSize; in _grow() 451 void VectorImpl::_shrink(size_t where, size_t amount) in _shrink() argument 459 ALOG_ASSERT(where + amount <= mCount, in _shrink() 461 this, (int)where, (int)amount, (int)mCount); // caller already checked in _shrink() 464 LOG_ALWAYS_FATAL_IF(__builtin_sub_overflow(mCount, amount, &new_size)); in _shrink() 508 _do_destroy(to, amount); in _shrink() [all …]
|
/aosp14/system/core/libstats/expresslog/include/ |
H A D | Counter.h | 26 static void logIncrement(const char* metricId, int64_t amount = 1); 28 static void logIncrementWithUid(const char* metricId, int32_t uid, int64_t amount = 1);
|
/aosp14/frameworks/base/core/java/com/android/internal/widget/ |
H A D | OrientationHelper.java | 176 public abstract void offsetChildren(int amount); in offsetChildren() argument 263 public void offsetChildren(int amount) { in createHorizontalHelper() argument 264 mLayoutManager.offsetChildrenHorizontal(amount); in createHorizontalHelper() 361 public void offsetChildren(int amount) { 362 mLayoutManager.offsetChildrenVertical(amount);
|
/aosp14/frameworks/base/tests/SilkFX/src/com/android/test/silkfx/materials/ |
H A D | BackgroundBlurActivity.kt | 156 fun setDimAmount(amount: Float) { 158 mDimAmountWithBlur = amount 160 mDimAmountNoBlur = amount 162 (findViewById(R.id.dim_amount) as TextView).setText("%.2f".format(amount)) 163 window.getAttributes().dimAmount = amount
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/privacy/television/ |
H A D | PrivacyChipDrawable.java | 158 private void lerpRect(Rect start, Rect stop, float amount, RectF out) { in lerpRect() argument 159 float left = MathUtils.lerp(start.left, stop.left, amount); in lerpRect() 160 float top = MathUtils.lerp(start.top, stop.top, amount); in lerpRect() 161 float right = MathUtils.lerp(start.right, stop.right, amount); in lerpRect() 162 float bottom = MathUtils.lerp(start.bottom, stop.bottom, amount); in lerpRect()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/ |
H A D | LightRevealScrimViewBinder.kt | 32 viewModel.revealAmount.collect { amount -> revealScrim.revealAmount = amount }
|
/aosp14/frameworks/base/core/java/android/text/method/ |
H A D | BaseMovementMethod.java | 495 protected boolean scrollLeft(TextView widget, Spannable buffer, int amount) { in scrollLeft() argument 499 scrollX = Math.max(scrollX - getCharacterWidth(widget) * amount, minScrollX); in scrollLeft() 516 protected boolean scrollRight(TextView widget, Spannable buffer, int amount) { in scrollRight() argument 520 scrollX = Math.min(scrollX + getCharacterWidth(widget) * amount, maxScrollX); in scrollRight() 537 protected boolean scrollUp(TextView widget, Spannable buffer, int amount) { in scrollUp() argument 547 topLine = Math.max(topLine - amount + 1, 0); in scrollUp() 564 protected boolean scrollDown(TextView widget, Spannable buffer, int amount) { in scrollDown() argument 577 bottomLine = Math.min(bottomLine + amount - 1, limit); in scrollDown()
|
/aosp14/frameworks/base/tools/aapt/ |
H A D | IndentPrinter.h | 13 void indent(int amount = 1) { 14 mIndent += amount;
|
/aosp14/frameworks/base/packages/SystemUI/unfold/src/com/android/systemui/unfold/progress/ |
H A D | PhysicsBasedUnfoldTransitionProgressProvider.kt | 89 private fun saturate(amount: Float, low: Float = 0f, high: Float = 1f): Float = 90 if (amount < low) low else if (amount > high) high else amount
|
/aosp14/frameworks/base/core/java/com/android/internal/graphics/ |
H A D | ColorUtils.java | 594 private static float constrain(float amount, float low, float high) { in constrain() argument 595 return amount < low ? low : (amount > high ? high : amount); in constrain() 598 private static int constrain(int amount, int low, int high) { in constrain() argument 599 return amount < low ? low : (amount > high ? high : amount); in constrain()
|
/aosp14/frameworks/base/packages/SettingsLib/AppPreference/src/com/android/settingslib/widget/ |
H A D | AppPreference.java | 61 public void setProgress(int amount) { in setProgress() argument 62 mProgress = amount; in setProgress()
|