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

Commit a0d0503b authored by Fabian Kozynski's avatar Fabian Kozynski Committed by Automerger Merge Worker
Browse files

Merge "Change color of seamless chip border" into rvc-dev am: 9de64deb

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11953545

Change-Id: I9a4418454476d2e7a602e3fe89d1bd335a299c8d
parents 10193f95 9de64deb
Loading
Loading
Loading
Loading
+26 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2020 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="@color/media_seamless_border">
    <item android:id="@android:id/background">
        <shape
            android:color="@android:color/transparent">
            <stroke android:width="1dp" android:color="@color/media_seamless_border"/>
            <corners android:radius="24dp"/>
        </shape>
    </item>
</ripple>
 No newline at end of file
+1 −1
Original line number Original line Diff line number Diff line
@@ -94,7 +94,7 @@
        android:id="@+id/media_seamless"
        android:id="@+id/media_seamless"
        android:layout_width="0dp"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_height="wrap_content"
        android:foreground="@*android:drawable/media_seamless_background"
        android:foreground="@drawable/qs_media_seamless_background"
        android:background="@drawable/qs_media_light_source"
        android:background="@drawable/qs_media_light_source"
        android:orientation="horizontal"
        android:orientation="horizontal"
        android:forceHasOverlappingRendering="false"
        android:forceHasOverlappingRendering="false"
+1 −0
Original line number Original line Diff line number Diff line
@@ -248,6 +248,7 @@
    <color name="media_secondary_text">#99ffffff</color> <!-- 60% -->
    <color name="media_secondary_text">#99ffffff</color> <!-- 60% -->
    <color name="media_seekbar_progress">#c0ffffff</color>
    <color name="media_seekbar_progress">#c0ffffff</color>
    <color name="media_disabled">#80ffffff</color>
    <color name="media_disabled">#80ffffff</color>
    <color name="media_seamless_border">#26ffffff</color> <!-- 15% -->


    <!-- controls -->
    <!-- controls -->
    <color name="control_primary_text">#E6FFFFFF</color>
    <color name="control_primary_text">#E6FFFFFF</color>
+0 −9
Original line number Original line Diff line number Diff line
@@ -20,13 +20,10 @@ import android.app.PendingIntent;
import android.content.Context;
import android.content.Context;
import android.content.Intent;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.Outline;
import android.graphics.Outline;
import android.graphics.Rect;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.Icon;
import android.graphics.drawable.Icon;
import android.graphics.drawable.RippleDrawable;
import android.media.session.MediaController;
import android.media.session.MediaController;
import android.media.session.MediaSession;
import android.media.session.MediaSession;
import android.media.session.PlaybackState;
import android.media.session.PlaybackState;
@@ -258,12 +255,6 @@ public class MediaControlPanel {
        ImageView iconView = mViewHolder.getSeamlessIcon();
        ImageView iconView = mViewHolder.getSeamlessIcon();
        TextView deviceName = mViewHolder.getSeamlessText();
        TextView deviceName = mViewHolder.getSeamlessText();


        // Update the outline color
        RippleDrawable bkgDrawable = (RippleDrawable) mViewHolder.getSeamless().getForeground();
        GradientDrawable rect = (GradientDrawable) bkgDrawable.getDrawable(0);
        rect.setStroke(2, deviceName.getCurrentTextColor());
        rect.setColor(Color.TRANSPARENT);

        final MediaDeviceData device = data.getDevice();
        final MediaDeviceData device = data.getDevice();
        final int seamlessId = mViewHolder.getSeamless().getId();
        final int seamlessId = mViewHolder.getSeamless().getId();
        final int seamlessFallbackId = mViewHolder.getSeamlessFallback().getId();
        final int seamlessFallbackId = mViewHolder.getSeamlessFallback().getId();