commit | d0267d5f8d7538dcb49ac98a4e85671396c63be5 | [log] [tgz] |
---|---|---|
author | Yu-Han Yang <yuhany@google.com> | Wed Mar 03 20:45:29 2021 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Wed Mar 03 20:45:29 2021 +0000 |
tree | e2a54fdcf8b3272e0a10c4606fdcd4040352047d | |
parent | 18ae34ec90867c13a4a6699723cc187ccc576e0a [diff] | |
parent | f7513d982166d06713aa0c813ceeb3105579c24e [diff] |
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);