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

Commit 8ce9566d authored by Caitlin Cassidy's avatar Caitlin Cassidy
Browse files

[Media TTT] Add the ripple behind the receiver chip.

This mostly just creates a generic ripple/ package with the relevant
classes and uses it for both the charging ripple and ttt ripple.

The full specs of the ripple (size, duration, interpolation, etc. etc.)
aren't finished yet -- I'll polish these with UX next week.

Bug: 203800342
Test: manual (see video attached to bug)
Test: atest SystemUITests
Change-Id: Icdae0cc189121b90ad88e507135876ce4b1979fa
parent 7e0149d2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -21,6 +21,12 @@
    android:layout_height="wrap_content"
    >

    <com.android.systemui.media.taptotransfer.receiver.ReceiverChipRippleView
        android:id="@+id/ripple"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        />

    <com.android.internal.widget.CachingIconView
        android:id="@+id/app_icon"
        android:layout_width="@dimen/media_ttt_icon_size_receiver"
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.android.systemui.statusbar.charging.ChargingRippleView
    <com.android.systemui.ripple.RippleView
        android:id="@+id/wireless_charging_ripple"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>
+2 −3
Original line number Diff line number Diff line
@@ -29,8 +29,7 @@ import android.view.View
import android.view.animation.PathInterpolator
import com.android.internal.graphics.ColorUtils
import com.android.systemui.animation.Interpolators
import com.android.systemui.statusbar.charging.DwellRippleShader
import com.android.systemui.statusbar.charging.RippleShader
import com.android.systemui.ripple.RippleShader

private const val RIPPLE_SPARKLE_STRENGTH: Float = 0.4f

@@ -298,7 +297,7 @@ class AuthRippleView(context: Context?, attrs: AttributeSet?) : View(context, at
            addListener(object : AnimatorListenerAdapter() {
                override fun onAnimationStart(animation: Animator?) {
                    unlockedRippleInProgress = true
                    rippleShader.shouldFadeOutRipple = true
                    rippleShader.rippleFill = false
                    drawRipple = true
                    visibility = VISIBLE
                }
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package com.android.systemui.statusbar.charging
package com.android.systemui.biometrics

import android.graphics.PointF
import android.graphics.RuntimeShader
+3 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package com.android.systemui.statusbar.charging
package com.android.systemui.charging

import android.content.Context
import android.content.res.Configuration
@@ -32,6 +32,7 @@ import com.android.systemui.R
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.flags.FeatureFlags
import com.android.systemui.flags.Flags
import com.android.systemui.ripple.RippleView
import com.android.systemui.statusbar.commandline.Command
import com.android.systemui.statusbar.commandline.CommandRegistry
import com.android.systemui.statusbar.policy.BatteryController
@@ -84,7 +85,7 @@ class WiredChargingRippleController @Inject constructor(
    private var debounceLevel = 0

    @VisibleForTesting
    var rippleView: ChargingRippleView = ChargingRippleView(context, attrs = null)
    var rippleView: RippleView = RippleView(context, attrs = null)

    init {
        pluggedIn = batteryController.isPluggedIn
Loading