Fix for MidiManager bug
Returning null if MidiManager service can't be created instead of crashing with NPE. bug: 22087661 Change-Id: Ia27835ea1197af2db04c3e7f1d2e7c9f32fddbd0
This commit is contained in:
@@ -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));
|
||||
}});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user