Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add volume-SettingsView patch

  • Loading branch information...
commit a54df895218271f6b3cf58cfaf30d654152ed7e3 1 parent ed0dce9
@riverzhou authored
Showing with 113 additions and 1 deletion.
  1. +112 −0 0003-frameworks-base-volume-SettingsView.patch
  2. +1 −1  patch.sh
View
112 0003-frameworks-base-volume-SettingsView.patch
@@ -0,0 +1,112 @@
+From 640d1928f8ef9d69361b715f8dcedeef9db6b9ee Mon Sep 17 00:00:00 2001
+From: 0xD34D <clark@scheffsblend.com>
+Date: Tue, 10 Jul 2012 20:26:20 -0700
+Subject: [PATCH] Added volume slider for STREAM_MUSIC to SettingsView
+
+Change-Id: I5939c478564310ba5abbef00d2e2e3f613ee3b48
+---
+ .../res/drawable-mdpi/ic_sysbar_volume.png | Bin 0 -> 1176 bytes
+ .../res/layout/system_bar_settings_view.xml | 18 ++++++++++++++++++
+ .../statusbar/policy/VolumeController.java | 2 +-
+ .../systemui/statusbar/tablet/SettingsView.java | 3 +++
+ 4 files changed, 22 insertions(+), 1 deletion(-)
+ create mode 100644 packages/SystemUI/res/drawable-mdpi/ic_sysbar_volume.png
+
+diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_volume.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_volume.png
+new file mode 100644
+index 0000000000000000000000000000000000000000..7691c2378a8cac7d78c4436b50da3529333a063f
+GIT binary patch
+literal 1176
+zcmV;J1ZVq+P)<h;3K|Lk000e1NJLTq001BW001Be1^@s6b9#F800006VoOIv0RI60
+z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru+y@H-5)`aqHxd8<1SLsC
+zK~z}7?N(h#99I<nW_C>7rPPMiwoz<sD{V+AF+og0YEr0TeefZrBv2_z!KYGc9?e4w
+zz7_itAyBDrLK16juvm%F3fZJ+NC;>MnkK8Wy6&#K>(Bno+*$9O(}%c47jdmhDa8*i
+zbI(1ObH6!%9N+*4_`f0&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urOdZVDAVDD4O@bK^l6B8467Zw)2
+z&eZkv^Z)=lIyxKxpzHeCxw*OD9zTA3yT8A`;PU0m`!kS?j*ixQJf1JNyVKg*>YAFG
+z`gvw%W_)C1<g@<%esxEEU?+I`^y$EM;k$nQI?kUzZ<LppUvWB}ALi!f{#0LIPwVIZ
+q&QN;w>eWs1wQJW7CiMgSH}Mx}LDnfEv;$cH0000<MNUMnLSTYg`X|Kz
+
+literal 0
+HcmV?d00001
+
+diff --git a/packages/SystemUI/res/layout/system_bar_settings_view.xml b/packages/SystemUI/res/layout/system_bar_settings_view.xml
+index e1b2a54..00adaef 100644
+--- a/packages/SystemUI/res/layout/system_bar_settings_view.xml
++++ b/packages/SystemUI/res/layout/system_bar_settings_view.xml
+@@ -111,6 +111,24 @@
+ </LinearLayout>
+ <View style="@style/StatusBarPanelSettingsPanelSeparator" />
+
++ <!-- Volume -->
++ <LinearLayout style="@style/StatusBarPanelSettingsRow" >
++ <ImageView
++ android:id="@+id/volume_icon"
++ style="@style/StatusBarPanelSettingsIcon"
++ android:src="@drawable/ic_sysbar_volume"
++ />
++ <com.android.systemui.statusbar.policy.ToggleSlider
++ android:id="@+id/volume"
++ android:layout_width="0dp"
++ android:layout_height="fill_parent"
++ android:layout_weight="1"
++ android:layout_marginRight="2dp"
++ systemui:text="@string/status_bar_settings_mute_label"
++ />
++ </LinearLayout>
++ <View style="@style/StatusBarPanelSettingsPanelSeparator" />
++
+ <!-- Notifications / Do not disturb -->
+ <LinearLayout
+ android:id="@+id/do_not_disturb"
+diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/VolumeController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/VolumeController.java
+index 43cb85e..e9b80b4 100644
+--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/VolumeController.java
++++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/VolumeController.java
+@@ -29,7 +29,7 @@ import android.widget.CompoundButton;
+
+ public class VolumeController implements ToggleSlider.Listener {
+ private static final String TAG = "StatusBar.VolumeController";
+- private static final int STREAM = AudioManager.STREAM_NOTIFICATION;
++ private static final int STREAM = AudioManager.STREAM_MUSIC;
+
+ private Context mContext;
+ private ToggleSlider mControl;
+diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SettingsView.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SettingsView.java
+index 537ff66..15e5b82 100644
+--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SettingsView.java
++++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SettingsView.java
+@@ -42,6 +42,7 @@ public class SettingsView extends LinearLayout implements View.OnClickListener {
+ AirplaneModeController mAirplane;
+ AutoRotateController mRotate;
+ BrightnessController mBrightness;
++ VolumeController mVolume;
+ DoNotDisturbController mDoNotDisturb;
+ View mRotationLockContainer;
+ View mRotationLockSeparator;
+@@ -78,6 +79,8 @@ public class SettingsView extends LinearLayout implements View.OnClickListener {
+
+ mBrightness = new BrightnessController(context,
+ (ToggleSlider)findViewById(R.id.brightness));
++ mVolume = new VolumeController(context,
++ (ToggleSlider)findViewById(R.id.volume));
+ mDoNotDisturb = new DoNotDisturbController(context,
+ (CompoundButton)findViewById(R.id.do_not_disturb_checkbox));
+ findViewById(R.id.settings).setOnClickListener(this);
+--
+1.7.9.5
+
View
2  patch.sh
@@ -26,7 +26,7 @@ git checkout -f
git clean -d -f
git apply ../../local/0001-frameworks-base-services-fix-screenshot-rotation.patch
git apply ../../local/0002-frameworks-base-services-screenshot-powerbutton.patch
-#git apply ../../local/0003-frameworks-base-switch-debug.ui.tablet.patch
+git apply ../../local/0003-frameworks-base-volume-SettingsView.patch
cd ../..
cd frameworks/av/
Please sign in to comment.
Something went wrong with that request. Please try again.