Merge "Add showSystem to RecentLocationAccess (Settings)" into sc-dev
diff --git a/src/com/android/settings/location/RecentLocationAccessPreferenceController.java b/src/com/android/settings/location/RecentLocationAccessPreferenceController.java
index 245118d..f4ef0eb 100644
--- a/src/com/android/settings/location/RecentLocationAccessPreferenceController.java
+++ b/src/com/android/settings/location/RecentLocationAccessPreferenceController.java
@@ -85,7 +85,8 @@
         final Context prefContext = mCategoryRecentLocationRequests.getContext();
         final List<RecentLocationAccesses.Access> recentLocationAccesses = new ArrayList<>();
         final UserManager userManager = UserManager.get(mContext);
-        for (RecentLocationAccesses.Access access : mRecentLocationApps.getAppListSorted()) {
+        for (RecentLocationAccesses.Access access : mRecentLocationApps.getAppListSorted(
+                /* showSystemApps= */ false)) {
             if (isRequestMatchesProfileType(userManager, access, mType)) {
                 recentLocationAccesses.add(access);
             }
diff --git a/tests/robotests/src/com/android/settings/location/RecentLocationAccessPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/location/RecentLocationAccessPreferenceControllerTest.java
index 5feee60..32c8627 100644
--- a/tests/robotests/src/com/android/settings/location/RecentLocationAccessPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/location/RecentLocationAccessPreferenceControllerTest.java
@@ -98,7 +98,7 @@
     @Test
     @Ignore
     public void updateState_whenAppListIsEmpty_shouldDisplayTitleTextAndDetailsText() {
-        doReturn(new ArrayList<>()).when(mRecentLocationApps).getAppListSorted();
+        doReturn(new ArrayList<>()).when(mRecentLocationApps).getAppListSorted(false);
         mController.displayPreference(mScreen);
         mController.updateState(mLayoutPreference);