Move unrestricted data summary to DataSaverController

DataSaverController currently used in 2 pages,
- Network & internet > Data Saver
- Apps > Special app access

This helps unify the logic, and instead of showing on "Special app
access", this summary shows on "Unrestricted data" is make more sense.

Bug: 280280596
Test: Manually on above pages
Test: Unit test
Change-Id: Ia151ed8179a250f8f20cc5041f9383fffebdab10
This commit is contained in:
Chaohui Wang
2023-05-26 11:38:38 +08:00
parent d8fbd089d8
commit 3e35cff7ba
11 changed files with 139 additions and 449 deletions

View File

@@ -66,7 +66,6 @@ public class AppDashboardFragment extends DashboardFragment {
@Override
public void onAttach(Context context) {
super.onAttach(context);
use(SpecialAppAccessPreferenceController.class).setSession(getSettingsLifecycle());
mAppsPreferenceController = use(AppsPreferenceController.class);
mAppsPreferenceController.setFragment(this /* fragment */);
getSettingsLifecycle().addObserver(mAppsPreferenceController);