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

Commit 0956846e authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Avoid NullPointerException if Location manager is disabled" into main

parents 4d3c3dc2 c25790f8
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);