summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/location
diff options
context:
space:
mode:
authorRaff Tsai <rafftsai@google.com>2019-12-02 15:09:26 +0800
committerRaff Tsai <rafftsai@google.com>2019-12-02 15:13:50 +0800
commit91aa4b853ae3575c56445ee7adbe5f72d9ca2015 (patch)
treea139a6c89edd083101fd4934044defceb6811a1e /src/com/android/settings/location
parent0a2a6cfef78196dda0c95035e245836d0f2d0f6c (diff)
downloadpackages_apps_Settings-91aa4b853ae3575c56445ee7adbe5f72d9ca2015.tar.gz
packages_apps_Settings-91aa4b853ae3575c56445ee7adbe5f72d9ca2015.tar.bz2
packages_apps_Settings-91aa4b853ae3575c56445ee7adbe5f72d9ca2015.zip
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
Diffstat (limited to 'src/com/android/settings/location')
-rw-r--r--src/com/android/settings/location/RecentLocationRequestPreferenceController.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/com/android/settings/location/RecentLocationRequestPreferenceController.java b/src/com/android/settings/location/RecentLocationRequestPreferenceController.java
index 0af084c0fc..515df46a3c 100644
--- a/src/com/android/settings/location/RecentLocationRequestPreferenceController.java
+++ b/src/com/android/settings/location/RecentLocationRequestPreferenceController.java
@@ -74,12 +74,7 @@ public class RecentLocationRequestPreferenceController extends LocationBasePrefe
public void displayPreference(PreferenceScreen screen) {
super.displayPreference(screen);
mCategoryRecentLocationRequests = screen.findPreference(getPreferenceKey());
- }
-
- @Override
- public void updateState(Preference preference) {
- mCategoryRecentLocationRequests.removeAll();
- final Context prefContext = preference.getContext();
+ final Context prefContext = mCategoryRecentLocationRequests.getContext();
final List<RecentLocationApps.Request> recentLocationRequests =
mRecentLocationApps.getAppListSorted(false);
if (recentLocationRequests.size() > 3) {