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

Commit ad494bc0 authored by John Spurlock's avatar John Spurlock
Browse files

Volume: Remove silent mode icon.

Instead of changing the slider icon and state in silent mode,
maintain the previous state, but disable.

Add VolumePanel to sysui dumpstate.

Bug:16209908
Change-Id: If9730b51ae9190e1ace5888d92a6ab5ce241f8f2
parent 7226b9b6
Loading
Loading
Loading
Loading
+0 −28
Original line number Diff line number Diff line
<!--
Copyright (C) 2014 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" >
    <size
        android:width="32dp"
        android:height="32dp"/>

    <viewport
        android:viewportWidth="24.0"
        android:viewportHeight="24.0"/>

    <path
        android:fill="@color/qs_subhead"
        android:pathData="M11.5,22.0c1.1,0.0 2.0,-0.9 2.0,-2.0l-4.0,0.0C9.5,21.1 10.4,22.0 11.5,22.0zM18.0,10.5c0.0,-3.1 -2.1,-5.6 -5.0,-6.3L13.0,3.5C13.0,2.7 12.3,2.0 11.5,2.0C10.7,2.0 10.0,2.7 10.0,3.5l0.0,0.7C9.5,4.3 9.0,4.5 8.6,4.7l9.4,9.4L18.0,10.5zM17.7,19.0l2.0,2.0l1.3,-1.3L4.3,3.0L3.0,4.3l2.9,2.9C5.3,8.2 5.0,9.3 5.0,10.5L5.0,16.0l-2.0,2.0l0.0,1.0L17.7,19.0z" />
</vector>
+0 −28
Original line number Diff line number Diff line
<!--
Copyright (C) 2014 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" >
    <size
        android:width="19dp"
        android:height="19dp"/>

    <viewport
        android:viewportWidth="24.0"
        android:viewportHeight="24.0"/>

    <path
        android:fill="#FFFFFFFF"
        android:pathData="M11.5,22.0c1.1,0.0 2.0,-0.9 2.0,-2.0l-4.0,0.0C9.5,21.1 10.4,22.0 11.5,22.0zM18.0,10.5c0.0,-3.1 -2.1,-5.6 -5.0,-6.3L13.0,3.5C13.0,2.7 12.3,2.0 11.5,2.0C10.7,2.0 10.0,2.7 10.0,3.5l0.0,0.7C9.5,4.3 9.0,4.5 8.6,4.7l9.4,9.4L18.0,10.5zM17.7,19.0l2.0,2.0l1.3,-1.3L4.3,3.0L3.0,4.3l2.9,2.9C5.3,8.2 5.0,9.3 5.0,10.5L5.0,16.0l-2.0,2.0l0.0,1.0L17.7,19.0z" />
</vector>
+8 −3
Original line number Diff line number Diff line
@@ -60,12 +60,17 @@ public class DemoStatusIcons extends LinearLayout implements DemoMode {
        } else if (mDemoMode && command.equals(COMMAND_STATUS)) {
            String volume = args.getString("volume");
            if (volume != null) {
                int iconId = volume.equals("important") ? R.drawable.stat_sys_zen_important
                        : volume.equals("silent") ? R.drawable.stat_sys_ringer_silent
                        : volume.equals("vibrate") ? R.drawable.stat_sys_ringer_vibrate
                int iconId = volume.equals("vibrate") ? R.drawable.stat_sys_ringer_vibrate
                        : 0;
                updateSlot("volume", null, iconId);
            }
            String zen = args.getString("zen");
            if (zen != null) {
                int iconId = zen.equals("important") ? R.drawable.stat_sys_zen_important
                        : zen.equals("none") ? R.drawable.stat_sys_zen_none
                        : 0;
                updateSlot("zen", null, iconId);
            }
            String bt = args.getString("bluetooth");
            if (bt != null) {
                int iconId = bt.equals("disconnected") ? R.drawable.stat_sys_data_bluetooth
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ public class PhoneStatusBarPolicy {
        mService.setIconVisibility(SLOT_ZEN, false);

        // volume
        mService.setIcon(SLOT_VOLUME, R.drawable.stat_sys_ringer_silent, 0, null);
        mService.setIcon(SLOT_VOLUME, R.drawable.stat_sys_ringer_vibrate, 0, null);
        mService.setIconVisibility(SLOT_VOLUME, false);
        updateVolumeZen();
    }
+0 −1
Original line number Diff line number Diff line
@@ -20,5 +20,4 @@ import com.android.systemui.statusbar.policy.ZenModeController;

public interface VolumeComponent {
    ZenModeController getZenController();
    void setVolumePanel(VolumePanel panel);
}
Loading