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

Commit c999b088 authored by Matthew Fritze's avatar Matthew Fritze
Browse files

Add Volume panel

Volume panel hosts each volume stream, including:
- Media volume
- Call Volume
- Ring volume
- Alarm volume

Change-Id: I1801d10d2304c57615e9499386c638c74ffcd7c3
Screenshot: https://screenshot.googleplex.com/m764j65ECto
Bug: 117804161
Test: Manual app
Test: robolectric
parent c14316c4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -10233,6 +10233,9 @@
    <!-- Title for the Internet Connectivity dialog (settings panel) with Internet related settings [CHAR LIMIT=50] -->
    <string name="internet_connectivity_panel_title">Internet Connectivity</string>
    <!-- Title for the Volume dialog (settings panel) with all volume streams[CHAR LIMIT=50] -->
    <string name="volume_connectivity_panel_title">Volume</string>
    <!-- UI debug setting: force desktop mode [CHAR LIMIT=50] -->
    <string name="force_desktop_mode">Force desktop mode</string>
    <!-- UI debug setting: force desktop mode summary [CHAR LIMIT=NONE] -->
+4 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
        android:icon="@drawable/ic_media_stream"
        android:title="@string/media_volume_option_title"
        android:order="-180"
        settings:allowDynamicSummaryInSlice="true"
        settings:controller="com.android.settings.notification.MediaVolumePreferenceController"/>

    <!-- Media output switcher -->
@@ -44,6 +45,7 @@
        android:icon="@drawable/ic_local_phone_24_lib"
        android:title="@string/call_volume_option_title"
        android:order="-170"
        settings:allowDynamicSummaryInSlice="true"
        settings:controller="com.android.settings.notification.CallVolumePreferenceController"/>

    <!-- Hands free profile output switcher -->
@@ -60,6 +62,7 @@
        android:icon="@drawable/ic_notifications"
        android:title="@string/ring_volume_option_title"
        android:order="-160"
        settings:allowDynamicSummaryInSlice="true"
        settings:controller="com.android.settings.notification.RingVolumePreferenceController"/>


@@ -69,6 +72,7 @@
        android:icon="@*android:drawable/ic_audio_alarm"
        android:title="@string/alarm_volume_option_title"
        android:order="-150"
        settings:allowDynamicSummaryInSlice="true"
        settings:controller="com.android.settings.notification.AlarmVolumePreferenceController"/>

    <!-- Notification volume -->
+2 −2
Original line number Diff line number Diff line
@@ -47,8 +47,8 @@ public class InternetConnectivityPanel implements PanelContent {
    }

    @Override
    public String getTitle() {
        return (String) mContext.getText(R.string.internet_connectivity_panel_title);
    public CharSequence getTitle() {
        return mContext.getText(R.string.internet_connectivity_panel_title);
    }

    @Override
+2 −0
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@ public class PanelFeatureProviderImpl implements PanelFeatureProvider {
        switch (panelType) {
            case SettingsPanelActivity.PANEL_TYPE_WIFI:
                return InternetConnectivityPanel.create(context);
            case SettingsPanelActivity.PANEL_TYPE_VOLUME:
                return VolumePanel.create(context);
        }

        throw new IllegalStateException("No matching panel for: "  + panelType);
+3 −0
Original line number Diff line number Diff line
@@ -54,6 +54,9 @@ public class SettingsPanelActivity extends FragmentActivity {
    // TODO (b/117804442) move to framework
    public static final String PANEL_TYPE_WIFI = "wifi_panel";

    // TODO (b/117804442) move to framework
    public static final String PANEL_TYPE_VOLUME = "volume_panel";

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
Loading