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

Commit e1103a98 authored by Beth Thibodeau's avatar Beth Thibodeau
Browse files

Use label instead of cast icon in output switcher

When the device is null or not enabled, disable the output switcher chip
and display "Other device" as a fallback value, instead of a cast icon

Fixes: 159231146
Test: atest MediaControlPanelTest
Change-Id: I29ece6d32ca327d18c1e92e14f93876959c00ff3
parent 18062f81
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24"
    android:tint="?attr/colorControlNormal">
  <path
      android:fillColor="@android:color/white"
      android:pathData="M20,4H4c-1.1,0 -2,0.9 -2,2v11c0,1.1 0.9,2 2,2h4v2h3v-4H4V6h16v1h2V6c0,-1.1 -0.9,-2 -2,-2z"/>
  <path
      android:fillColor="@android:color/white"
      android:pathData="M17.5,16.5m-2.33,0a2.33,2.33 0,1 1,4.66 0a2.33,2.33 0,1 1,-4.66 0"/>
  <path
      android:fillColor="@android:color/white"
      android:pathData="M21,8h-7c-0.55,0 -1,0.45 -1,1v11c0,0.55 0.45,1 1,1h7c0.55,0 1,-0.45 1,-1L22,9c0,-0.55 -0.45,-1 -1,-1zM17.5,9c0.83,0 1.5,0.67 1.5,1.5s-0.67,1.5 -1.5,1.5 -1.5,-0.67 -1.5,-1.5 0.67,-1.5 1.5,-1.5zM17.5,20c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z"/>
</vector>
+0 −12
Original line number Diff line number Diff line
@@ -163,18 +163,6 @@
        </LinearLayout>
    </LinearLayout>

    <ImageView
        android:id="@+id/media_seamless_fallback"
        android:layout_width="@dimen/qs_seamless_fallback_icon_size"
        android:layout_height="@dimen/qs_seamless_fallback_icon_size"
        android:layout_marginTop="@dimen/qs_media_padding"
        android:layout_marginBottom="@dimen/qs_media_padding"
        android:layout_marginStart="@dimen/qs_center_guideline_padding"
        android:layout_marginEnd="@dimen/qs_seamless_fallback_margin"
        android:tint="?android:attr/textColor"
        android:src="@drawable/ic_cast_connected"
        android:forceHasOverlappingRendering="false" />

    <!-- Seek Bar -->
    <!-- As per Material Design on Biderectionality, this is forced to LTR in code -->
    <SeekBar
+0 −2
Original line number Diff line number Diff line
@@ -1298,8 +1298,6 @@
    <dimen name="qs_media_action_margin">12dp</dimen>
    <dimen name="qs_seamless_height">24dp</dimen>
    <dimen name="qs_seamless_icon_size">12dp</dimen>
    <dimen name="qs_seamless_fallback_icon_size">@dimen/qs_seamless_icon_size</dimen>
    <dimen name="qs_seamless_fallback_margin">20dp</dimen>
    <dimen name="qs_footer_horizontal_margin">22dp</dimen>
    <dimen name="qs_media_disabled_seekbar_height">1dp</dimen>
    <dimen name="qs_media_enabled_seekbar_height">2dp</dimen>
+1 −1
Original line number Diff line number Diff line
@@ -1008,7 +1008,7 @@
    <string name="sensor_privacy_start_use_mic_camera_dialog_content">This unblocks access for all apps and services allowed to use your camera or microphone.</string>

    <!-- Default name for the media device shown in the output switcher when the name is not available [CHAR LIMIT=30] -->
    <string name="media_seamless_remote_device">Device</string>
    <string name="media_seamless_other_device">Other device</string>

    <!-- QuickStep: Accessibility to toggle overview [CHAR LIMIT=40] -->
    <string name="quick_step_accessibility_toggle_overview">Toggle Overview</string>
+0 −17
Original line number Diff line number Diff line
@@ -43,23 +43,6 @@
        android:layout_marginStart="@dimen/qs_center_guideline_padding"
        />

    <Constraint
        android:id="@+id/media_seamless_fallback"
        android:layout_width="@dimen/qs_seamless_fallback_icon_size"
        android:layout_height="@dimen/qs_seamless_fallback_icon_size"
        android:layout_marginTop="@dimen/qs_media_padding"
        android:layout_marginBottom="@dimen/qs_media_padding"
        android:layout_marginStart="@dimen/qs_center_guideline_padding"
        android:layout_marginEnd="@dimen/qs_seamless_fallback_margin"
        android:alpha="0.5"
        android:visibility="gone"
        app:layout_constraintHorizontal_bias="1"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toTopOf="@id/center_horizontal_guideline"
        app:layout_constraintStart_toEndOf="@id/center_vertical_guideline"
        app:layout_constraintEnd_toEndOf="parent"
        />

    <Constraint
        android:id="@+id/album_art"
        android:layout_width="@dimen/qs_media_album_size_small"
Loading