summaryrefslogtreecommitdiffstats
path: root/policy/src/com
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2011-11-14 10:47:42 -0800
committerMike Lockwood <lockwood@google.com>2012-02-10 14:44:05 -0800
commitce952c8e13c535bedde77bcdb94dfcc7508475aa (patch)
tree7948a36f33d2b847ce14f757161955ff3d178d1a /policy/src/com
parenta5abdb9e580f7598ae5553f4490d16871453f9f5 (diff)
downloadframeworks_base-ce952c8e13c535bedde77bcdb94dfcc7508475aa.zip
frameworks_base-ce952c8e13c535bedde77bcdb94dfcc7508475aa.tar.gz
frameworks_base-ce952c8e13c535bedde77bcdb94dfcc7508475aa.tar.bz2
AudioManager: Add support for master mute
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'policy/src/com')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneFallbackEventHandler.java8
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java4
2 files changed, 5 insertions, 7 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneFallbackEventHandler.java b/policy/src/com/android/internal/policy/impl/PhoneFallbackEventHandler.java
index abed18f..83f7788 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneFallbackEventHandler.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneFallbackEventHandler.java
@@ -52,8 +52,7 @@ public class PhoneFallbackEventHandler implements FallbackEventHandler {
}
public void preDispatchKeyEvent(KeyEvent event) {
- getAudioManager().preDispatchKeyEvent(event.getKeyCode(),
- AudioManager.USE_DEFAULT_STREAM_TYPE);
+ getAudioManager().preDispatchKeyEvent(event, AudioManager.USE_DEFAULT_STREAM_TYPE);
}
public boolean dispatchKeyEvent(KeyEvent event) {
@@ -79,7 +78,7 @@ public class PhoneFallbackEventHandler implements FallbackEventHandler {
case KeyEvent.KEYCODE_VOLUME_UP:
case KeyEvent.KEYCODE_VOLUME_DOWN:
case KeyEvent.KEYCODE_VOLUME_MUTE: {
- getAudioManager().handleKeyDown(keyCode, AudioManager.USE_DEFAULT_STREAM_TYPE);
+ getAudioManager().handleKeyDown(event, AudioManager.USE_DEFAULT_STREAM_TYPE);
return true;
}
@@ -197,8 +196,7 @@ public class PhoneFallbackEventHandler implements FallbackEventHandler {
AudioManager audioManager = (AudioManager)mContext.getSystemService(
Context.AUDIO_SERVICE);
if (audioManager != null) {
- getAudioManager().handleKeyUp(keyCode,
- AudioManager.USE_DEFAULT_STREAM_TYPE);
+ getAudioManager().handleKeyUp(event, AudioManager.USE_DEFAULT_STREAM_TYPE);
}
}
return true;
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index f1fe43b..b87b8c3 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -1416,7 +1416,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
// doesn't have one of these. In this case, we execute it here and
// eat the event instead, because we have mVolumeControlStreamType
// and they don't.
- getAudioManager().handleKeyDown(keyCode, mVolumeControlStreamType);
+ getAudioManager().handleKeyDown(event, mVolumeControlStreamType);
return true;
}
@@ -1478,7 +1478,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
// doesn't have one of these. In this case, we execute it here and
// eat the event instead, because we have mVolumeControlStreamType
// and they don't.
- getAudioManager().handleKeyUp(keyCode, mVolumeControlStreamType);
+ getAudioManager().handleKeyUp(event, mVolumeControlStreamType);
return true;
}