Revert recent location apps to pre-Q behavior

- List recent location request instead of location access
- Show in list view instead of app list widget
- Add overflow menu to "see all" page to show/hide system apps

Bug: 124015107
Test: build, flash, and test manually
Change-Id: I78df6d4b13ddf774013e8d819cf343ce012e6b0b
This commit is contained in:
Lifu Tang
2019-05-06 15:24:04 -07:00
parent 12dcbe7c71
commit 166b54c0f6
7 changed files with 434 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ import com.android.settings.search.Indexable;
import com.android.settings.widget.SwitchBar;
import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.core.lifecycle.Lifecycle;
import com.android.settingslib.location.RecentLocationAccesses;
import com.android.settingslib.location.RecentLocationApps;
import com.android.settingslib.search.SearchIndexable;
import java.util.ArrayList;
@@ -50,7 +50,7 @@ import java.util.List;
* <li>In switch bar: location master switch. Used to toggle location on and off.
* </li>
* </ul>
* <li>Recent location requests: automatically populated by {@link RecentLocationAccesses}</li>
* <li>Recent location requests: automatically populated by {@link RecentLocationApps}</li>
* <li>Location services: multi-app settings provided from outside the Android framework. Each
* is injected by a system-partition app via the {@link SettingInjectorService} API.</li>
* </ul>
@@ -118,7 +118,7 @@ public class LocationSettings extends DashboardFragment {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
controllers.add(new AppLocationPermissionPreferenceController(context, lifecycle));
controllers.add(new LocationForWorkPreferenceController(context, lifecycle));
controllers.add(new RecentLocationAccessPreferenceController(context));
controllers.add(new RecentLocationRequestPreferenceController(context, fragment, lifecycle));
controllers.add(new LocationScanningPreferenceController(context));
controllers.add(new LocationServicePreferenceController(context, fragment, lifecycle));
controllers.add(new LocationFooterPreferenceController(context, lifecycle));