Start removing N/A DO disclosures from search index

DO disclosures referring to actions that the admin did not actually
take are hidden in the UI, but still show up in the search index. This
CL takes the following steps toward fixing this:
* Pass the list of PreferenceControllers to the search indexer
* Make the first two PrefrenceControllers set isAvailable() correctly

There are more disclosures to update, but the difficult work is done
as all others will follow the same pattern.

Bug: 32692748
Test: m RunSettingsRoboTests

Change-Id: I7d3e248b80abe72b79fce7afa11f28a822de6986
This commit is contained in:
Bartosz Fabianowski
2017-03-10 15:47:14 +01:00
parent 92ae1f2d8e
commit 5dc168af1a
13 changed files with 179 additions and 82 deletions

View File

@@ -56,8 +56,15 @@ public class ApplicationFeatureProviderImpl implements ApplicationFeatureProvide
}
@Override
public void calculateNumberOfInstalledApps(int installReason, NumberOfAppsCallback callback) {
new AllUserInstalledAppCounter(mContext, installReason, mPm, callback).execute();
public void calculateNumberOfInstalledApps(int installReason, boolean async,
NumberOfAppsCallback callback) {
final AllUserInstalledAppCounter counter = new AllUserInstalledAppCounter(mContext,
installReason, mPm, callback);
if (async) {
counter.execute();
} else {
counter.executeInForeground();
}
}
@Override