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

Commit afe8c7e9 authored by Yein Jo's avatar Yein Jo
Browse files

Add touch ripple in the media control panel, with flag protected.

Recordings are attached in the b/237282226 (tested with the flag enabled)

Bug: 237282226
Test: MediaControlPanelTest, ColorSchemeTransitionTest, RippleAnimationTest, MultiRippleControllerTest, Manual
Change-Id: Ib7409c946421950f3857dbd442bab10d0481fcf3
parent bc1f67ec
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -44,6 +44,15 @@
        android:background="@drawable/qs_media_outline_album_bg"
        />

    <com.android.systemui.ripple.MultiRippleView
        android:id="@+id/touch_ripple_view"
        android:layout_width="match_parent"
        android:layout_height="@dimen/qs_media_session_height_expanded"
        app:layout_constraintStart_toStartOf="@id/album_art"
        app:layout_constraintEnd_toEndOf="@id/album_art"
        app:layout_constraintTop_toTopOf="@id/album_art"
        app:layout_constraintBottom_toBottomOf="@id/album_art" />

    <!-- Guideline for output switcher -->
    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/center_vertical_guideline"
+10 −0
Original line number Diff line number Diff line
@@ -34,6 +34,16 @@
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent" />

    <!-- Touch ripple must have the same constraint as the album art. -->
    <Constraint
        android:id="@+id/touch_ripple_view"
        android:layout_width="match_parent"
        android:layout_height="@dimen/qs_media_session_height_collapsed"
        app:layout_constraintStart_toStartOf="@+id/album_art"
        app:layout_constraintEnd_toEndOf="@+id/album_art"
        app:layout_constraintTop_toTopOf="@+id/album_art"
        app:layout_constraintBottom_toBottomOf="@+id/album_art" />

    <Constraint
        android:id="@+id/header_title"
        android:layout_width="wrap_content"
+10 −0
Original line number Diff line number Diff line
@@ -27,6 +27,16 @@
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent" />

    <!-- Touch ripple must have the same constraint as the album art. -->
    <Constraint
        android:id="@+id/touch_ripple_view"
        android:layout_width="match_parent"
        android:layout_height="@dimen/qs_media_session_height_expanded"
        app:layout_constraintStart_toStartOf="@+id/album_art"
        app:layout_constraintEnd_toEndOf="@+id/album_art"
        app:layout_constraintTop_toTopOf="@+id/album_art"
        app:layout_constraintBottom_toBottomOf="@+id/album_art" />

    <Constraint
        android:id="@+id/header_title"
        android:layout_width="wrap_content"
+1 −1
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@ object Flags {
    @JvmField val DREAM_MEDIA_TAP_TO_OPEN = UnreleasedFlag(906)

    // TODO(b/254513168): Tracking Bug
    val UMO_SURFACE_RIPPLE = UnreleasedFlag(907)
    @JvmField val UMO_SURFACE_RIPPLE = UnreleasedFlag(907)

    // 1000 - dock
    val SIMULATE_DOCK_THROUGH_CHARGING = ReleasedFlag(1000)
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.widget.TextView
import androidx.constraintlayout.widget.Barrier
import com.android.systemui.R
import com.android.systemui.media.controls.models.GutsViewHolder
import com.android.systemui.ripple.MultiRippleView
import com.android.systemui.util.animation.TransitionLayout

private const val TAG = "MediaViewHolder"
@@ -36,6 +37,7 @@ class MediaViewHolder constructor(itemView: View) {

    // Player information
    val albumView = itemView.requireViewById<ImageView>(R.id.album_art)
    val multiRippleView = itemView.requireViewById<MultiRippleView>(R.id.touch_ripple_view)
    val appIcon = itemView.requireViewById<ImageView>(R.id.icon)
    val titleText = itemView.requireViewById<TextView>(R.id.header_title)
    val artistText = itemView.requireViewById<TextView>(R.id.header_artist)
Loading