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

Commit 95e2a5f5 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...

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

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3330014



Change-Id: I81d1deb58ebfaf8bb83a0ec7551664ef96e0d1d2
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 34309be5 f991ca6b
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);