Home
last modified time | relevance | path

Searched refs:fraction (Results 1 – 25 of 171) sorted by relevance

1234567

/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shade/transition/
DLargeScreenShadeInterpolatorImplTest.kt34 actual = { fraction -> impl.getBehindScrimAlpha(fraction) }, in <lambda>() method
35 expected = { fraction -> splitShadeInterpolator.getBehindScrimAlpha(fraction) } in <lambda>() method
44 actual = { fraction -> impl.getBehindScrimAlpha(fraction) }, in <lambda>() method
45 expected = { fraction -> portraitShadeInterpolator.getBehindScrimAlpha(fraction) } in <lambda>() method
54 actual = { fraction -> impl.getNotificationScrimAlpha(fraction) }, in <lambda>() method
55 expected = { fraction -> splitShadeInterpolator.getNotificationScrimAlpha(fraction) } in <lambda>() method
63 actual = { fraction -> impl.getNotificationScrimAlpha(fraction) }, in <lambda>() method
64 expected = { fraction -> portraitShadeInterpolator.getNotificationScrimAlpha(fraction) } in <lambda>() method
73 actual = { fraction -> impl.getNotificationContentAlpha(fraction) }, in <lambda>() method
74 expected = { fraction -> splitShadeInterpolator.getNotificationContentAlpha(fraction) } in <lambda>() method
[all …]
DLinearLargeScreenShadeInterpolator.kt20 override fun getBehindScrimAlpha(fraction: Float) = fraction
21 override fun getNotificationScrimAlpha(fraction: Float) = fraction
22 override fun getNotificationContentAlpha(fraction: Float) = fraction
23 override fun getNotificationFooterAlpha(fraction: Float) = fraction
24 override fun getQsAlpha(fraction: Float) = fraction
/frameworks/base/libs/hwui/
DPropertyValuesHolder.cpp29 inline constexpr float lerp(float fromValue, float toValue, float fraction) { in lerp() argument
30 return float(fromValue * (1 - fraction) + toValue * fraction); in lerp()
39 float fraction) const { in evaluate()
40 float a = lerp(SkColorGetA(fromColor) / 255.0f, SkColorGetA(toColor) / 255.0f, fraction); in evaluate()
41 float r = lerp(linearize(SkColorGetR(fromColor)), linearize(SkColorGetR(toColor)), fraction); in evaluate()
42 float g = lerp(linearize(SkColorGetG(fromColor)), linearize(SkColorGetG(toColor)), fraction); in evaluate()
43 float b = lerp(linearize(SkColorGetB(fromColor)), linearize(SkColorGetB(toColor)), fraction); in evaluate()
50 float fraction) const { in evaluate()
51 VectorDrawableUtils::interpolatePaths(out, from, to, fraction); in evaluate()
55 const T PropertyValuesHolderImpl<T>::getValueFromData(float fraction) const { in getValueFromData()
[all …]
DPropertyValuesHolder.h33 virtual void setFraction(float fraction) = 0;
40 virtual void evaluate(T* out, const T& from, const T& to, float fraction) const {}; in evaluate() argument
47 float fraction) const override { in evaluate() argument
48 *out = from * (1 - fraction) + to * fraction; in evaluate()
55 float fraction) const override;
60 float fraction) const override;
72 const T getValueFromData(float fraction) const;
75 const T calculateAnimatedValue(float fraction) const;
95 void setFraction(float fraction) override;
111 void setFraction(float fraction) override;
[all …]
/frameworks/base/packages/SystemUI/src/com/android/keyguard/
DBouncerPanelExpansionCalculator.kt26 fun showBouncerProgress(fraction: Float): Float { in showBouncerProgress()
28 fraction >= 0.9f -> 1f in showBouncerProgress()
29 fraction < 0.6 -> 0f in showBouncerProgress()
30 else -> (fraction - 0.6f) / 0.3f in showBouncerProgress()
38 fun aboutToShowBouncerProgress(fraction: Float): Float { in aboutToShowBouncerProgress()
39 return MathUtils.constrain((fraction - 0.9f) / 0.1f, 0f, 1f) in aboutToShowBouncerProgress()
46 fun getKeyguardClockScaledExpansion(fraction: Float): Float { in getKeyguardClockScaledExpansion()
47 return MathUtils.constrain((fraction - 0.7f) / 0.3f, 0f, 1f) in getKeyguardClockScaledExpansion()
54 fun getDreamYPositionScaledExpansion(fraction: Float): Float { in getDreamYPositionScaledExpansion()
56 fraction >= 0.98f -> 1f in getDreamYPositionScaledExpansion()
[all …]
/frameworks/base/core/java/android/animation/
DKeyframe.java82 public static Keyframe ofInt(float fraction, int value) { in ofInt() argument
83 return new IntKeyframe(fraction, value); in ofInt()
98 public static Keyframe ofInt(float fraction) { in ofInt() argument
99 return new IntKeyframe(fraction); in ofInt()
114 public static Keyframe ofFloat(float fraction, float value) { in ofFloat() argument
115 return new FloatKeyframe(fraction, value); in ofFloat()
130 public static Keyframe ofFloat(float fraction) { in ofFloat() argument
131 return new FloatKeyframe(fraction); in ofFloat()
146 public static Keyframe ofObject(float fraction, Object value) { in ofObject() argument
147 return new ObjectKeyframe(fraction, value); in ofObject()
[all …]
DPathKeyframes.java66 public Object getValue(float fraction) { in getValue() argument
68 if (fraction < 0) { in getValue()
69 return interpolateInRange(fraction, 0, 1); in getValue()
70 } else if (fraction > 1) { in getValue()
71 return interpolateInRange(fraction, numPoints - 2, numPoints - 1); in getValue()
72 } else if (fraction == 0) { in getValue()
74 } else if (fraction == 1) { in getValue()
85 if (fraction < midFraction) { in getValue()
87 } else if (fraction > midFraction) { in getValue()
95 return interpolateInRange(fraction, high, low); in getValue()
[all …]
DFloatKeyframeSet.java39 public Object getValue(float fraction) { in getValue() argument
40 return getFloatValue(fraction); in getValue()
56 public float getFloatValue(float fraction) { in getFloatValue() argument
57 if (fraction <= 0f) { in getFloatValue()
66 fraction = interpolator.getInterpolation(fraction); in getFloatValue()
68 float intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction); in getFloatValue()
73 } else if (fraction >= 1f) { in getFloatValue()
82 fraction = interpolator.getInterpolation(fraction); in getFloatValue()
84 float intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction); in getFloatValue()
93 if (fraction < nextKeyframe.getFraction()) { in getFloatValue()
[all …]
DIntKeyframeSet.java39 public Object getValue(float fraction) { in getValue() argument
40 return getIntValue(fraction); in getValue()
56 public int getIntValue(float fraction) { in getIntValue() argument
57 if (fraction <= 0f) { in getIntValue()
66 fraction = interpolator.getInterpolation(fraction); in getIntValue()
68 float intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction); in getIntValue()
73 } else if (fraction >= 1f) { in getIntValue()
82 fraction = interpolator.getInterpolation(fraction); in getIntValue()
84 float intervalFraction = (fraction - prevFraction) / (nextFraction - prevFraction); in getIntValue()
92 if (fraction < nextKeyframe.getFraction()) { in getIntValue()
[all …]
DValueAnimator.java737 float fraction = mDuration > 0 ? (float) playTime / mDuration : 1; in setCurrentPlayTime() local
738 setCurrentFraction(fraction); in setCurrentPlayTime()
758 public void setCurrentFraction(float fraction) { in setCurrentFraction() argument
760 fraction = clampFraction(fraction); in setCurrentFraction()
763 long seekTime = (long) (getScaledDuration() * fraction); in setCurrentFraction()
771 mSeekFraction = fraction; in setCurrentFraction()
773 mOverallFraction = fraction; in setCurrentFraction()
774 final float currentIterationFraction = getCurrentIterationFraction(fraction, mReversing); in setCurrentFraction()
783 private int getCurrentIteration(float fraction) { in getCurrentIteration() argument
784 fraction = clampFraction(fraction); in getCurrentIteration()
[all …]
DKeyframeSet.java196 public Object getValue(float fraction) { in getValue() argument
200 fraction = mInterpolator.getInterpolation(fraction); in getValue()
202 return mEvaluator.evaluate(fraction, mFirstKeyframe.getValue(), in getValue()
205 if (fraction <= 0f) { in getValue()
209 fraction = interpolator.getInterpolation(fraction); in getValue()
212 float intervalFraction = (fraction - prevFraction) / in getValue()
216 } else if (fraction >= 1f) { in getValue()
220 fraction = interpolator.getInterpolation(fraction); in getValue()
223 float intervalFraction = (fraction - prevFraction) / in getValue()
231 if (fraction < nextKeyframe.getFraction()) { in getValue()
[all …]
DRectEvaluator.java72 public Rect evaluate(float fraction, Rect startValue, Rect endValue) { in evaluate() argument
73 int left = startValue.left + (int) ((endValue.left - startValue.left) * fraction); in evaluate()
74 int top = startValue.top + (int) ((endValue.top - startValue.top) * fraction); in evaluate()
75 int right = startValue.right + (int) ((endValue.right - startValue.right) * fraction); in evaluate()
76 int bottom = startValue.bottom + (int) ((endValue.bottom - startValue.bottom) * fraction); in evaluate()
DArgbEvaluator.java57 public Object evaluate(float fraction, Object startValue, Object endValue) { in evaluate() argument
80 float a = startA + fraction * (endA - startA); in evaluate()
81 float r = startR + fraction * (endR - startR); in evaluate()
82 float g = startG + fraction * (endG - startG); in evaluate()
83 float b = startB + fraction * (endB - startB); in evaluate()
/frameworks/base/packages/SystemUI/src/com/android/systemui/shade/transition/
DSplitShadeInterpolator.kt26 override fun getBehindScrimAlpha(fraction: Float): Float { in getBehindScrimAlpha()
30 return mapFraction(start = 0f, end = 0.4f, fraction) in getBehindScrimAlpha()
33 override fun getNotificationScrimAlpha(fraction: Float): Float { in getNotificationScrimAlpha()
37 return mapFraction(start = 0.39f, end = 0.66f, fraction) in getNotificationScrimAlpha()
40 override fun getNotificationContentAlpha(fraction: Float): Float { in getNotificationContentAlpha()
41 return getNotificationScrimAlpha(fraction) in getNotificationContentAlpha()
44 override fun getNotificationFooterAlpha(fraction: Float): Float { in getNotificationFooterAlpha()
48 return mapFraction(start = 0.576f, end = 0.897f, fraction) in getNotificationFooterAlpha()
51 override fun getQsAlpha(fraction: Float): Float { in getQsAlpha()
52 return getNotificationScrimAlpha(fraction) in getQsAlpha()
[all …]
DLargeScreenPortraitShadeInterpolator.kt27 override fun getBehindScrimAlpha(fraction: Float): Float { in getBehindScrimAlpha()
28 return MathUtils.constrainedMap(0f, 1f, 0f, 0.3f, fraction) in getBehindScrimAlpha()
31 override fun getNotificationScrimAlpha(fraction: Float): Float { in getNotificationScrimAlpha()
32 return MathUtils.constrainedMap(0f, 1f, 0.3f, 0.75f, fraction) in getNotificationScrimAlpha()
35 override fun getNotificationContentAlpha(fraction: Float): Float { in getNotificationContentAlpha()
36 return ShadeInterpolation.getContentAlpha(fraction) in getNotificationContentAlpha()
39 override fun getNotificationFooterAlpha(fraction: Float): Float { in getNotificationFooterAlpha()
40 return ShadeInterpolation.getContentAlpha(fraction) in getNotificationFooterAlpha()
43 override fun getQsAlpha(fraction: Float): Float { in getQsAlpha()
44 return ShadeInterpolation.getContentAlpha(fraction) in getQsAlpha()
DLargeScreenShadeInterpolatorImpl.kt62 override fun getBehindScrimAlpha(fraction: Float) = impl.getBehindScrimAlpha(fraction)
64 override fun getNotificationScrimAlpha(fraction: Float) =
65 impl.getNotificationScrimAlpha(fraction)
67 override fun getNotificationContentAlpha(fraction: Float) =
68 impl.getNotificationContentAlpha(fraction)
70 override fun getNotificationFooterAlpha(fraction: Float) =
71 impl.getNotificationFooterAlpha(fraction)
73 override fun getQsAlpha(fraction: Float) = impl.getQsAlpha(fraction)
DLargeScreenShadeInterpolator.kt23 fun getBehindScrimAlpha(fraction: Float): Float
26 fun getNotificationScrimAlpha(fraction: Float): Float
29 fun getNotificationContentAlpha(fraction: Float): Float
32 fun getNotificationFooterAlpha(fraction: Float): Float
35 fun getQsAlpha(fraction: Float): Float
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shade/
DShadeExpansionStateManagerTest.kt39 val fraction = 0.6f in onPanelExpansionChanged_listenerNotified() constant
45 fraction, in onPanelExpansionChanged_listenerNotified()
51 assertThat(listener.fraction).isEqualTo(fraction) in onPanelExpansionChanged_listenerNotified()
59 val fraction = 0.6f in addExpansionListener_listenerNotifiedOfCurrentValues() constant
64 fraction, in addExpansionListener_listenerNotifiedOfCurrentValues()
73 assertThat(listener.fraction).isEqualTo(fraction) in addExpansionListener_listenerNotifiedOfCurrentValues()
99 fraction = 0.5f, in onPEC_fractionLessThanOne_expandedTrue_trackingFalse_becomesStateOpening()
114 fraction = 0.5f, in onPEC_fractionLessThanOne_expandedTrue_trackingTrue_becomesStateOpening()
131 fraction = 0.5f, in onPEC_fractionLessThanOne_expandedFalse_trackingFalse_becomesStateClosed()
148 fraction = 0.5f, in onPEC_fractionLessThanOne_expandedFalse_trackingTrue_doesNotBecomeStateClosed()
[all …]
/frameworks/base/core/java/android/transition/
DSlide.java61 float getGoneX(ViewGroup sceneRoot, View view, float fraction); in getGoneX() argument
64 float getGoneY(ViewGroup sceneRoot, View view, float fraction); in getGoneY() argument
70 public float getGoneY(ViewGroup sceneRoot, View view, float fraction) { in getGoneY() argument
78 public float getGoneX(ViewGroup sceneRoot, View view, float fraction) { in getGoneX() argument
85 public float getGoneX(ViewGroup sceneRoot, View view, float fraction) {
86 return view.getTranslationX() - sceneRoot.getWidth() * fraction;
92 public float getGoneX(ViewGroup sceneRoot, View view, float fraction) {
96 x = view.getTranslationX() + sceneRoot.getWidth() * fraction;
98 x = view.getTranslationX() - sceneRoot.getWidth() * fraction;
106 public float getGoneY(ViewGroup sceneRoot, View view, float fraction) {
[all …]
/frameworks/base/packages/SystemUI/animation/src/com/android/systemui/animation/
DShadeInterpolation.kt13 fun getNotificationScrimAlpha(fraction: Float): Float { in getNotificationScrimAlpha()
14 val mappedFraction = MathUtils.constrainedMap(0f, 1f, 0f, 0.5f, fraction) in getNotificationScrimAlpha()
24 fun getContentAlpha(fraction: Float): Float { in getContentAlpha()
25 val mappedFraction = MathUtils.constrainedMap(0f, 1f, 0.3f, 1f, fraction) in getContentAlpha()
29 private fun interpolateEaseInOut(fraction: Float): Float { in interpolateEaseInOut()
30 val mappedFraction = fraction * 1.2f - 0.2f in interpolateEaseInOut()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/
DPipAnimationController.java487 SurfaceControl.Transaction tx, float fraction); in applySurfaceControlTransaction() argument
495 SurfaceControl.Transaction tx, float fraction) { in ofAlpha()
496 final float alpha = getStartValue() * (1 - fraction) + getEndValue() * fraction; in ofAlpha()
577 SurfaceControl.Transaction tx, float fraction) { in ofBounds() argument
581 Rect bounds = mRectEvaluator.evaluate(fraction, start, end); in ofBounds()
583 mContentOverlay.onAnimationUpdate(tx, bounds, fraction); in ofBounds()
588 applyRotation(tx, leash, fraction, start, end); in ofBounds()
591 float angle = (1.0f - fraction) * startingAngle; in ofBounds()
604 final Rect insets = computeInsets(fraction); in ofBounds()
607 isInPipDirection, fraction); in ofBounds()
[all …]
/frameworks/base/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/
DDefaultClockController.kt180 fun moveForSplitShade(fromRect: Rect, toRect: Rect, fraction: Float) { in moveForSplitShade()
181 view.moveForSplitShade(fromRect, toRect, fraction) in moveForSplitShade()
240 override fun fold(fraction: Float) { in fold()
241 val (hasChanged, hasJumped) = foldState.update(fraction) in fold()
247 override fun doze(fraction: Float) { in doze()
248 val (hasChanged, hasJumped) = dozeState.update(fraction) in doze()
254 override fun onPositionUpdated(fromRect: Rect, toRect: Rect, fraction: Float) { in onPositionUpdated()
255 largeClock.moveForSplitShade(fromRect, toRect, fraction) in onPositionUpdated()
263 var fraction: Float, variable in AnimationState
265 var isActive: Boolean = fraction > 0.5f
[all …]
/frameworks/av/media/codecs/amrwb/enc/src/
Dlog2.c60 Word16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1) */ in Log2_norm() argument
68 *fraction = 0; in Log2_norm()
81 *fraction = extract_h (L_y); in Log2_norm()
101 Word16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1) */ in Log2() argument
107 Log2_norm ((L_x << exp), exp, exponent, fraction); in Log2()
/frameworks/base/packages/SystemUI/src/com/android/systemui/shade/
DShadeExpansionStateManager.kt43 @FloatRange(from = 0.0, to = 1.0) private var fraction: Float = 0f variable in com.android.systemui.shade.ShadeExpansionStateManager
57 ShadeExpansionChangeEvent(fraction, expanded, tracking, dragDownPxAmount) in addExpansionListener()
114 @FloatRange(from = 0.0, to = 1.0) fraction: Float, in isClosed()
119 require(!fraction.isNaN()) { "fraction cannot be NaN" } in isClosed()
122 this.fraction = fraction in isClosed()
135 fullyOpened = fraction >= 1f in isClosed()
148 "f=$fraction " + in isClosed()
157 ShadeExpansionChangeEvent(fraction, expanded, tracking, dragDownPxAmount) in isClosed()
/frameworks/base/core/java/android/inputmethodservice/
DCompactExtractEditLayout.java69 private int applyFractionInt(@FractionRes int fraction, int whole) { in applyFractionInt() argument
70 return Math.round(getResources().getFraction(fraction, whole, whole)); in applyFractionInt()
90 com.android.internal.R.fraction.input_extract_layout_height, screenHeightPx)); in applyProportionalLayout()
93 applyFractionInt(com.android.internal.R.fraction.input_extract_layout_padding_left, in applyProportionalLayout()
96 applyFractionInt(com.android.internal.R.fraction.input_extract_layout_padding_right, in applyProportionalLayout()
101 applyFractionInt(com.android.internal.R.fraction.input_extract_text_margin_bottom, in applyProportionalLayout()
105 applyFractionInt(com.android.internal.R.fraction.input_extract_action_margin_bottom, in applyProportionalLayout()

1234567