Merge "Fix search highlight"

This commit is contained in:
Fan Zhang
2018-02-20 23:38:46 +00:00
committed by Android (Google) Code Review
6 changed files with 118 additions and 43 deletions

View File

@@ -67,15 +67,13 @@ public class LocationSettings extends DashboardFragment {
private LocationSwitchBarController mSwitchBarController;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
public int getInitialExpandedChildCount() {
final RecentLocationApps recentLocationApps = new RecentLocationApps(getActivity());
int locationRequestsApps = recentLocationApps.getAppList().size();
int locationRequestsPrefs = locationRequestsApps == 0 ? 1 : locationRequestsApps;
getPreferenceScreen().setInitialExpandedChildrenCount(locationRequestsPrefs + 2);
final int locationRequestsApps = recentLocationApps.getAppList().size();
final int locationRequestsPrefs = locationRequestsApps == 0 ? 1 : locationRequestsApps;
return locationRequestsPrefs + 2;
}
@Override
public int getMetricsCategory() {
return MetricsEvent.LOCATION;