Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b8e5271 authored by Yein Jo's avatar Yein Jo
Browse files

Move surface effects package to AnimationLib.

in order to share surface effects between launcher and sysui, the
package has been moved to the AnimationLib, which is visible to launcher
as well.

fyi the corresponding tests remain in the SystemUiLib module.
technically they should be moved to AnimationLib together, but those
tests are dependant on SystemUI testing frameworks (e.g. SysuiTestCase,
FakeExecutor, etc.). because of this, some of the variables are marked
as VisibleForTesting.

Bug: 249536060
Test: MultiRippleControllerTest MultiRippleViewTest RippleAnimationTest RippleViewTest TurbulenceNoiseControllerTest TurbulenceNoiseViewTest
Change-Id: I37cdc7cf9064d4d8f02afe72ad16b1cc3df95b6c
parent 5932f31d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -34,7 +34,12 @@ android_library {
        "res",
    ],

    static_libs: ["androidx.core_core-animation-nodeps"],
    static_libs: [
        "PluginCoreLib",
        "androidx.core_core-animation-nodeps",
        "androidx.core_core-ktx",
        "androidx.annotation_annotation",
    ],

    manifest: "AndroidManifest.xml",
    kotlincflags: ["-Xjvm-default=all"],
+0 −0

File moved.

+3 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.graphics.Paint
import android.util.AttributeSet
import android.util.Log
import android.view.View
import androidx.annotation.VisibleForTesting

/**
 * A view that allows multiple ripples to play.
@@ -30,7 +31,8 @@ import android.view.View
 */
class MultiRippleView(context: Context?, attrs: AttributeSet?) : View(context, attrs) {

    internal val ripples = ArrayList<RippleAnimation>()
    @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
    val ripples = ArrayList<RippleAnimation>()
    private val listeners = ArrayList<RipplesFinishedListener>()
    private val ripplePaint = Paint()
    private var isWarningLogged = false
+3 −1
Original line number Diff line number Diff line
@@ -19,11 +19,13 @@ package com.android.systemui.surfaceeffects.ripple
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.animation.ValueAnimator
import androidx.annotation.VisibleForTesting
import androidx.core.graphics.ColorUtils

/** A single ripple animation. */
class RippleAnimation(private val config: RippleAnimationConfig) {
    internal val rippleShader: RippleShader = RippleShader(config.rippleShape)
    @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
    val rippleShader: RippleShader = RippleShader(config.rippleShape)
    private val animator: ValueAnimator = ValueAnimator.ofFloat(0f, 1f)

    init {
+0 −0

File moved.

Loading