summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/volume
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2014-12-01 17:06:12 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-12-01 17:06:14 +0000
commit21d68f4808db02aa3252ba5dec8b0220d053cab3 (patch)
tree16841dc91979f54435ff9097fed2f0edcd51fb58 /packages/SystemUI/src/com/android/systemui/volume
parent6cacf44e7ecfe50097adc99dab97c3fb9770a1af (diff)
parentbcc1087af40a0e1bb35dbe8a39c830ecdea8280b (diff)
downloadframeworks_base-21d68f4808db02aa3252ba5dec8b0220d053cab3.zip
frameworks_base-21d68f4808db02aa3252ba5dec8b0220d053cab3.tar.gz
frameworks_base-21d68f4808db02aa3252ba5dec8b0220d053cab3.tar.bz2
Merge "Volume: Improve inline volume controls used in settings." into lmp-mr1-dev
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/volume')
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java9
2 files changed, 7 insertions, 15 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
index 0aa3c1e..d3a8fc0 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
@@ -546,6 +546,7 @@ public class VolumePanel extends Handler implements DemoMode {
private void registerReceiver() {
final IntentFilter filter = new IntentFilter();
filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
+ filter.addAction(AudioManager.INTERNAL_RINGER_MODE_CHANGED_ACTION);
filter.addAction(Intent.ACTION_SCREEN_OFF);
mContext.registerReceiver(new BroadcastReceiver() {
@Override
@@ -554,7 +555,12 @@ public class VolumePanel extends Handler implements DemoMode {
if (AudioManager.RINGER_MODE_CHANGED_ACTION.equals(action)) {
removeMessages(MSG_RINGER_MODE_CHANGED);
- sendMessage(obtainMessage(MSG_RINGER_MODE_CHANGED));
+ sendEmptyMessage(MSG_RINGER_MODE_CHANGED);
+ }
+
+ if (AudioManager.INTERNAL_RINGER_MODE_CHANGED_ACTION.equals(action)) {
+ removeMessages(MSG_INTERNAL_RINGER_MODE_CHANGED);
+ sendEmptyMessage(MSG_INTERNAL_RINGER_MODE_CHANGED);
}
if (Intent.ACTION_SCREEN_OFF.equals(action)) {
@@ -991,11 +997,6 @@ public class VolumePanel extends Handler implements DemoMode {
obtainMessage(MSG_LAYOUT_DIRECTION, layoutDirection, 0).sendToTarget();
}
- public void postInternalRingerModeChanged(int mode) {
- removeMessages(MSG_INTERNAL_RINGER_MODE_CHANGED);
- obtainMessage(MSG_INTERNAL_RINGER_MODE_CHANGED, mode, 0).sendToTarget();
- }
-
private static String flagsToString(int flags) {
return flags == 0 ? "0" : (flags + "=" + AudioManager.flagsToString(flags));
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java
index e452b22..7102c2a 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java
@@ -182,15 +182,6 @@ public class VolumeUI extends SystemUI {
}
@Override
- public void internalRingerModeChanged(int mode) throws RemoteException {
- mPanel.postInternalRingerModeChanged(mode);
- final PhoneStatusBar psb = getComponent(PhoneStatusBar.class);
- if (psb != null) {
- psb.onInternalRingerModeChanged();
- }
- }
-
- @Override
public ZenModeController getZenController() {
return mPanel.getZenController();
}