From 91aa4b853ae3575c56445ee7adbe5f72d9ca2015 Mon Sep 17 00:00:00 2001 From: Raff Tsai Date: Mon, 2 Dec 2019 15:09:26 +0800 Subject: [PATCH] Adjust preferene to align the lastest mock - Because removeAll in updateState will cause preference list janking, move updateState code to displayPreference. Bug: 141601408 Fixes: 145369584 Test: manual and robolectric Change-Id: Ic6ffeedfdd7a64671e497a61894d7c0d443750ef --- res/values/strings.xml | 2 - res/xml/location_settings_personal.xml | 43 +++++++-------- res/xml/location_settings_workprofile.xml | 52 ++++++++----------- ...ntLocationRequestPreferenceController.java | 7 +-- 4 files changed, 41 insertions(+), 63 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 63dee46c6e1..e24f7881e0c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -3776,8 +3776,6 @@ See all Location services - - Recent work app location requests My Location diff --git a/res/xml/location_settings_personal.xml b/res/xml/location_settings_personal.xml index f07d0e89651..de8ed817080 100644 --- a/res/xml/location_settings_personal.xml +++ b/res/xml/location_settings_personal.xml @@ -34,34 +34,27 @@ android:fragment="com.android.settings.location.RecentLocationRequestSeeAllFragment" settings:searchable="false"/> - - - - + + - - - + + + - + - - - + - - + + + + + + + + + - - - - - - - - - - - + android:key="location_services_managed_profile" + settings:controller="com.android.settings.location.LocationServiceForWorkPreferenceController"/> recentLocationRequests = mRecentLocationApps.getAppListSorted(false); if (recentLocationRequests.size() > 3) {