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

Commit 8bb5c93f authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Add null check on serviceinfo

Fixes: 36542315
Test: adb shell settings put secure enabled_notification_listeners
"com.android.systemui/.BogusComponent"
doesn't cause restart
Change-Id: I9ec12970a32f4909df0676b287c4cd45076968cf
parent 6a10cba1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -583,7 +583,7 @@ abstract public class ManagedServices {
                    ServiceInfo info = mPm.getServiceInfo(component,
                            PackageManager.MATCH_DIRECT_BOOT_AWARE
                                    | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, userIds[i]);
                    if (!mConfig.bindPermission.equals(info.permission)) {
                    if (info == null || !mConfig.bindPermission.equals(info.permission)) {
                        Slog.w(TAG, "Skipping " + getCaption() + " service " + component
                                + ": it does not require the permission " + mConfig.bindPermission);
                        continue;