Loading src/com/android/settings/location/LocationSettings.java +11 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ public class LocationSettings extends DashboardFragment implements private LocationSwitchBarController mSwitchBarController; private LocationEnabler mLocationEnabler; private RecentLocationAccessPreferenceController mController; @Override public int getMetricsCategory() { Loading @@ -86,12 +87,21 @@ public class LocationSettings extends DashboardFragment implements super.onAttach(context); use(AppLocationPermissionPreferenceController.class).init(this); use(RecentLocationAccessPreferenceController.class).init(this); mController = use(RecentLocationAccessPreferenceController.class); mController.init(this); use(RecentLocationAccessSeeAllButtonPreferenceController.class).init(this); use(LocationForWorkPreferenceController.class).init(this); use(LocationSettingsFooterPreferenceController.class).init(this); } @Override public void onPause() { super.onPause(); if (mController != null) { mController.clearPreferenceList(); } } @Override protected int getPreferenceScreenResId() { return R.xml.location_settings; Loading src/com/android/settings/location/RecentLocationAccessPreferenceController.java +9 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,15 @@ public class RecentLocationAccessPreferenceController extends LocationBasePrefer mCategoryRecentLocationRequests.setVisible(enabled); } /** * Clears the list of apps which recently accessed location from the screen. */ public void clearPreferenceList() { if (mCategoryRecentLocationRequests != null) { mCategoryRecentLocationRequests.removeAll(); } } /** * Initialize {@link ProfileSelectFragment.ProfileType} of the controller * Loading Loading
src/com/android/settings/location/LocationSettings.java +11 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ public class LocationSettings extends DashboardFragment implements private LocationSwitchBarController mSwitchBarController; private LocationEnabler mLocationEnabler; private RecentLocationAccessPreferenceController mController; @Override public int getMetricsCategory() { Loading @@ -86,12 +87,21 @@ public class LocationSettings extends DashboardFragment implements super.onAttach(context); use(AppLocationPermissionPreferenceController.class).init(this); use(RecentLocationAccessPreferenceController.class).init(this); mController = use(RecentLocationAccessPreferenceController.class); mController.init(this); use(RecentLocationAccessSeeAllButtonPreferenceController.class).init(this); use(LocationForWorkPreferenceController.class).init(this); use(LocationSettingsFooterPreferenceController.class).init(this); } @Override public void onPause() { super.onPause(); if (mController != null) { mController.clearPreferenceList(); } } @Override protected int getPreferenceScreenResId() { return R.xml.location_settings; Loading
src/com/android/settings/location/RecentLocationAccessPreferenceController.java +9 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,15 @@ public class RecentLocationAccessPreferenceController extends LocationBasePrefer mCategoryRecentLocationRequests.setVisible(enabled); } /** * Clears the list of apps which recently accessed location from the screen. */ public void clearPreferenceList() { if (mCategoryRecentLocationRequests != null) { mCategoryRecentLocationRequests.removeAll(); } } /** * Initialize {@link ProfileSelectFragment.ProfileType} of the controller * Loading