summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ricardo Garcia <rago@google.com> 2015-07-20 18:47:21 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2015-07-20 18:47:21 +0000
commit238f03c9b38182c2e4347ece097b4cb18ba926ab (patch)
tree35564b3f7dc7f6e9852cb66a994df3ee2db93d2f
parentdd0602e89daf6c458674efbcf01a5e0521f3c381 (diff)
parent2dcfc7a9972de3abfebdf2d84bcba0095e4fbae5 (diff)
am 2dcfc7a9: Merge "Fix for MidiManager bug" into mnc-dev
* commit '2dcfc7a9972de3abfebdf2d84bcba0095e4fbae5': Fix for MidiManager bug
-rw-r--r--core/java/android/app/SystemServiceRegistry.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index 10e8a535014b..01a1c18b99a2 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -691,6 +691,9 @@ final class SystemServiceRegistry {
@Override
public MidiManager createService(ContextImpl ctx) {
IBinder b = ServiceManager.getService(Context.MIDI_SERVICE);
+ if (b == null) {
+ return null;
+ }
return new MidiManager(IMidiManager.Stub.asInterface(b));
}});