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

Commit 00da57f9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Filter "Android System" from recent location apps" into qt-r1-dev

parents 70cd8e7b f5076dfc
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -90,12 +90,16 @@ public class RecentLocationApps {

        for (int i = 0; i < appOpsCount; ++i) {
            AppOpsManager.PackageOps ops = appOps.get(i);
            // Don't show the Android System in the list - it's not actionable for the user.
            // Also don't show apps belonging to background users except managed users.
            String packageName = ops.getPackageName();
            int uid = ops.getUid();
            final UserHandle user = UserHandle.getUserHandleForUid(uid);

            // Don't show apps belonging to background users except managed users.
            if (!profiles.contains(user)) {
            boolean isAndroidOs =
                    (uid == android.os.Process.SYSTEM_UID) && ANDROID_SYSTEM_PACKAGE_NAME.equals(
                            packageName);
            if (isAndroidOs || !profiles.contains(user)) {
                continue;
            }