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

Commit f991ca6b authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Avoid NullPointerException if Location manager is disabled" into main am: 0956846e

parents 49cf1399 0956846e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@ public final class AppOpsPolicy implements AppOpsManagerInternal.CheckOpsDelegat

        final LocationManagerInternal locationManagerInternal = LocalServices.getService(
                LocationManagerInternal.class);
        if (locationManagerInternal != null) {
            locationManagerInternal.setLocationPackageTagsListener(
                (uid, packageTagsList) -> {
                    synchronized (mLock) {
@@ -158,6 +159,7 @@ public final class AppOpsPolicy implements AppOpsManagerInternal.CheckOpsDelegat
                                mLocationTags);
                    }
                });
        }

        final IntentFilter intentFilter = new IntentFilter();
        intentFilter.addAction(Intent.ACTION_PACKAGE_ADDED);