summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Burk <philburk@google.com>2015-03-19 14:59:20 -0700
committerPhil Burk <philburk@google.com>2015-03-19 14:59:20 -0700
commit413d307c2c646bb2aa563f8167bfa78f0b59a654 (patch)
treeefaeab383f44099fa6893a6cf87f206ce869106c
parent77a7308dd1c8335cf3c5ffce0b2cd6a74ca1e46e (diff)
downloadframeworks_base-413d307c2c646bb2aa563f8167bfa78f0b59a654.zip
frameworks_base-413d307c2c646bb2aa563f8167bfa78f0b59a654.tar.gz
frameworks_base-413d307c2c646bb2aa563f8167bfa78f0b59a654.tar.bz2
AudioService: fix crash when mediaserver killed
Bug: 19847028 Change-Id: I4acacd8a6d20317d180a6994158abc0b2957280c Signed-off-by: Phil Burk <philburk@google.com>
-rw-r--r--services/core/java/com/android/server/audio/AudioService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index 83ecf91..5296ff1 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -4111,8 +4111,9 @@ public class AudioService extends IAudioService.Stub {
Iterator i = set.iterator();
while (i.hasNext()) {
Map.Entry device = (Map.Entry)i.next();
+ DeviceListSpec spec = (DeviceListSpec)device.getValue();
AudioSystem.setDeviceConnectionState(
- ((Integer)device.getKey()).intValue(),
+ spec.mDeviceType,
AudioSystem.DEVICE_STATE_AVAILABLE,
(String)device.getValue(),
"unknown-device");