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

Commit 5585c08c authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Accessibility and silent mode changes to Volume Panel."

parents be3ba059 9b8e8485
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ import android.net.Uri;
import android.os.Handler;
import android.os.Message;
import android.os.Vibrator;
import android.provider.Settings;
import android.provider.Settings.System;
import android.util.Log;
import android.widget.ImageView;
import android.widget.SeekBar;
@@ -233,6 +235,10 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie
    }

    private void createSliders() {
        final int silentableStreams = System.getInt(mContext.getContentResolver(),
                System.MODE_RINGER_STREAMS_AFFECTED,
                ((1 << AudioSystem.STREAM_NOTIFICATION) | (1 << AudioSystem.STREAM_RING)));

        LayoutInflater inflater = (LayoutInflater) mContext
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        mStreamControls = new HashMap<Integer,StreamControl>(STREAM_TYPES.length);
@@ -243,7 +249,9 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie
            sc.group = (ViewGroup) inflater.inflate(R.layout.volume_adjust_item, null);
            sc.group.setTag(sc);
            sc.icon = (ImageView) sc.group.findViewById(R.id.stream_icon);
            if ((silentableStreams & (1 << sc.streamType)) != 0) {
                sc.icon.setOnClickListener(this);
            }
            sc.icon.setTag(sc);
            sc.icon.setContentDescription(res.getString(CONTENT_DESCRIPTIONS[i]));
            sc.iconRes = STREAM_ICONS_NORMAL[i];
+0 −1
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@
            android:padding="16dip"
            android:background="?attr/selectableItemBackground"
            android:src="@drawable/ic_sysbar_quicksettings"
            android:contentDescription="@string/volume_panel_more_description"
            />

    </LinearLayout>
+0 −1
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:padding="16dip"
        android:layout_marginLeft="8dip"
        android:layout_marginRight="8dip" />

</LinearLayout>
+5 −7
Original line number Diff line number Diff line
@@ -2550,17 +2550,15 @@
    <string name="volume_unknown">Volume</string>

    <!-- Content description for bluetooth volume icon [CHAR LIMIT=100] -->
    <string name="volume_icon_description_bluetooth">Bluetooth volume. Tap to toggle silent mode.</string>
    <string name="volume_icon_description_bluetooth">Bluetooth volume</string>
    <!-- Content description for ringer volume icon [CHAR LIMIT=100] -->
    <string name="volume_icon_description_ringer">Ringtone volume. Tap to toggle silent mode.</string>
    <string name="volume_icon_description_ringer">Ringtone volume</string>
    <!-- Content description for in-call volume icon [CHAR LIMIT=100] -->
    <string name="volume_icon_description_incall">Call volume. Tap to toggle silent mode.</string>
    <string name="volume_icon_description_incall">Call volume</string>
    <!-- Content description for media volume icon [CHAR LIMIT=100] -->
    <string name="volume_icon_description_media">Media volume. Tap to toggle silent mode.</string>
    <string name="volume_icon_description_media">Media volume</string>
    <!-- Content description for notification volume icon [CHAR LIMIT=100] -->
    <string name="volume_icon_description_notification">Notification volume. Tap to toggle silent mode.</string>
    <!-- Content description for volume settings expansion button [CHAR LIMIT=100] -->
    <string name="volume_panel_more_description">Tap to show more audio stream volumes.</string>
    <string name="volume_icon_description_notification">Notification volume</string>

    <!-- Ringtone picker strings --> <skip />
    <!-- Choice in the ringtone picker.  If chosen, the default ringtone will be used. -->