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

Commit d555ba85 authored by Jaewan Kim's avatar Jaewan Kim
Browse files

MediaSessionService: Fix NPE when startup

Bug: 158050954
Test: Manually tested that the issue is gone after following command
      $ adb shell
      $ settings secure put media_button_receiver ",10"
      $ reboot
Change-Id: I0d7df2d349140c09282d029df80c2cf2060c5405
parent 36806fa8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -85,6 +85,9 @@ final class MediaButtonReceiverHolder {
            return null;
        }
        ComponentName componentName = ComponentName.unflattenFromString(tokens[0]);
        if (componentName == null) {
            return null;
        }
        int userId = Integer.parseInt(tokens[1]);
        // Guess component type if the OS version is updated from the older version.
        int componentType = (tokens.length == 3)