Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47abda57 authored by Ricardo Garcia's avatar Ricardo Garcia
Browse files

Fix for MidiManager bug

Returning null if MidiManager service can't be created instead
of crashing with NPE.

bug: 22087661
Change-Id: Ia27835ea1197af2db04c3e7f1d2e7c9f32fddbd0
parent e40d7a63
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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));
            }});