Add summary to special app access.

Get the count of apps that has unrestricted data access and add that to
the summary for Apps & notifications -> Special app access.

Bug: 36376411
Test: make RunSettingsRoboTests
Change-Id: Id80a030e1e066f1391f94114f478091a2a87fcd8
This commit is contained in:
Doris Ling
2017-04-11 15:35:49 -07:00
parent 09317a6545
commit 6f3364bf78
3 changed files with 142 additions and 1 deletions

View File

@@ -25,6 +25,7 @@ import com.android.settings.core.PreferenceController;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.search.BaseSearchIndexProvider;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -55,7 +56,13 @@ public class AppAndNotificationDashboardFragment extends DashboardFragment {
@Override
protected List<PreferenceController> getPreferenceControllers(Context context) {
return null;
return buildPreferenceControllers(context);
}
private static List<PreferenceController> buildPreferenceControllers(Context context) {
final List<PreferenceController> controllers = new ArrayList<>();
controllers.add(new SpecialAppAccessPreferenceController(context));
return controllers;
}
public static final SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
@@ -67,5 +74,10 @@ public class AppAndNotificationDashboardFragment extends DashboardFragment {
sir.xmlResId = R.xml.app_and_notification;
return Arrays.asList(sir);
}
@Override
public List<PreferenceController> getPreferenceControllers(Context context) {
return buildPreferenceControllers(context);
}
};
}