Add "See All" page for Recent Location Access
Screenshots: http://shortn/_UPy8KFSeSj Bug: 180533061 Test: manual on device Change-Id: Ib77bc0705835520ed1a2d3b7f662088ed838e53e
This commit is contained in:
@@ -38,6 +38,7 @@ import java.util.List;
|
||||
* Preference controller that handles the display of apps that access locations.
|
||||
*/
|
||||
public class RecentLocationAccessPreferenceController extends LocationBasePreferenceController {
|
||||
public static final int MAX_APPS = 3;
|
||||
@VisibleForTesting
|
||||
RecentLocationAccesses mRecentLocationApps;
|
||||
private PreferenceCategory mCategoryRecentLocationRequests;
|
||||
@@ -89,6 +90,9 @@ public class RecentLocationAccessPreferenceController extends LocationBasePrefer
|
||||
/* showSystemApps= */ false)) {
|
||||
if (isRequestMatchesProfileType(userManager, access, mType)) {
|
||||
recentLocationAccesses.add(access);
|
||||
if (recentLocationAccesses.size() == MAX_APPS) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user