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

Commit 2876e83a authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Volume UI updates" into pi-dev

parents 197e1d5c ac55e01e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import android.content.ComponentName;
import android.media.AudioManager;
import android.media.AudioSystem;
import android.os.Handler;
import android.os.VibrationEffect;
import android.util.SparseArray;

import com.android.systemui.plugins.VolumeDialogController.Callbacks;
@@ -44,7 +45,8 @@ public interface VolumeDialogController {
    void setRingerMode(int ringerModeNormal, boolean external);

    boolean hasVibrator();
    void vibrate();
    void vibrate(VibrationEffect effect);
    void scheduleTouchFeedback();

    AudioManager getAudioManager();

+14 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 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.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <solid android:color="?android:attr/colorPrimaryDark" />
+30 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 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="?android:attr/colorControlHighlight">
    <item android:id="@android:id/mask">
        <shape xmlns:android="http://schemas.android.com/apk/res/android">
            <solid android:color="#FFFFFFFF"/>
            <corners android:radius="8dp"/>
        </shape>
    </item>
    <item android:id="@android:id/background">
        <shape android:shape="rectangle">
            <solid android:color="#FFFFFFFF"/>
            <corners android:radius="8dp"/>
        </shape>
    </item>
</ripple>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@
            android:orientation="vertical"
            android:clipChildren="false"
            android:clipToPadding="false"
            android:elevation="@dimen/volume_panel_elevation" >
            android:elevation="@dimen/volume_dialog_elevation" >
            <LinearLayout
                android:id="@+id/car_volume_dialog_rows"
                android:layout_width="match_parent"
+14 −9
Original line number Diff line number Diff line
@@ -17,9 +17,11 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:padding="@dimen/volume_dialog_panel_transparent_padding"
    android:background="@android:color/transparent"
    android:theme="@style/qs_theme"
    android:clipChildren="false" >
    android:clipChildren="false"
    android:clipToPadding="false">
    <!-- right-aligned to be physically near volume button -->
    <LinearLayout
        android:id="@+id/volume_dialog"
@@ -30,22 +32,25 @@
        android:background="@android:color/transparent"
        android:layout_margin="@dimen/volume_dialog_base_margin"
        android:orientation="vertical"
        android:clipChildren="false" >
        android:clipChildren="false"
        android:clipToPadding="false" >

        <FrameLayout
            android:id="@+id/ringer"
            android:layout_width="@dimen/volume_dialog_ringer_size"
            android:layout_height="@dimen/volume_dialog_ringer_size"
            android:layout_marginBottom="@dimen/volume_dialog_spacer"
            android:elevation="@dimen/volume_panel_elevation"
            android:translationZ="@dimen/volume_dialog_elevation"
            android:layout_gravity="right"
            android:clipChildren="false"
            android:clipToPadding="false"
            android:background="@drawable/rounded_bg_full">
            <com.android.keyguard.AlphaOptimizedImageButton
                android:id="@+id/ringer_icon"
                style="@style/VolumeButtons"
                android:background="?android:selectableItemBackgroundBorderless"
                android:layout_width="@dimen/volume_dialog_tap_target_size"
                android:layout_height="@dimen/volume_dialog_tap_target_size"
                android:background="@drawable/rounded_ripple"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:tint="@color/accent_tint_color_selector"
                android:layout_gravity="center"
                android:soundEffectsEnabled="false" />
@@ -59,10 +64,10 @@
            android:minWidth="@dimen/volume_dialog_panel_width"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:translationZ="@dimen/volume_dialog_elevation"
            android:clipChildren="false"
            android:clipToPadding="false"
            android:background="@drawable/rounded_bg_full"
            android:elevation="@dimen/volume_panel_elevation" >
            android:background="@drawable/rounded_bg_full" >
            <LinearLayout
                android:id="@+id/volume_dialog_rows"
                android:layout_width="wrap_content"
@@ -84,7 +89,7 @@
                    android:layout_height="@dimen/volume_dialog_tap_target_size"
                    android:layout_gravity="center"
                    android:contentDescription="@string/accessibility_volume_settings"
                    android:background="?android:selectableItemBackgroundBorderless"
                    android:background="@drawable/ripple_drawable_20dp"
                    android:tint="?android:attr/colorControlNormal"
                    android:soundEffectsEnabled="false" />
            </FrameLayout>
Loading