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

Commit a62ca144 authored by Taeun Kim's avatar Taeun Kim
Browse files

Fix NullPointerException by 'adb shell service call uimode 1'

Bug: 224685960
Change-Id: I3d2139bb0eac64ff98756371753102b7d39572a3
Test: test manually, testOnEnterExitCarMode
parent c7573178
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2175,6 +2175,10 @@ public class InCallController extends CallsManagerListenerBase implements
    public void handleCarModeChange(int priority, String packageName, boolean isCarMode) {
        Log.i(this, "handleCarModeChange: packageName=%s, priority=%d, isCarMode=%b",
                packageName, priority, isCarMode);
        if (packageName == null) {
            Log.i(this, "handleCarModeChange: Got null packageName, ignoring");
            return;
        }
        // Don't ignore the signal if we are disabling car mode; package may be uninstalled.
        if (isCarMode && !isCarModeInCallService(packageName)) {
            Log.i(this, "handleCarModeChange: not a valid InCallService; packageName=%s",