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

@@ -35,15 +35,17 @@ public interface ApplicationFeatureProvider {
public static final int IGNORE_INSTALL_REASON = -1;
/**
* Asynchronously calculates the total number of apps installed on the device, across all users
* and managed profiles.
* Calculates the total number of apps installed on the device, across all users and managed
* profiles.
*
* @param installReason Only consider apps with this install reason; may be any install reason
* defined in {@link android.content.pm.PackageManager} or
* {@link #IGNORE_INSTALL_REASON} to count all apps, irrespective of install reason.
* @param async Whether to count asynchronously in a background thread
* @param callback The callback to invoke with the result
*/
void calculateNumberOfInstalledApps(int installReason, NumberOfAppsCallback callback);
void calculateNumberOfInstalledApps(int installReason, boolean async,
NumberOfAppsCallback callback);
/**
* Asynchronously calculates the total number of apps installed on the device, across all users