Enable the suggesiton test on disabled components
The activity to test suggestions might be disabled by configuration. To
avoid no component found for testing, just query activities including
the disabled components.
Fix: 300160935
Test: atest SettingsRoboTests:com.android.settings.suggestions
Change-Id: I37718ea79480d16a90c67635666b8cdfa8be4dae
diff --git a/tests/robotests/src/com/android/settings/suggestions/SettingsSuggestionsTest.java b/tests/robotests/src/com/android/settings/suggestions/SettingsSuggestionsTest.java
index d686f50..9f02f1f 100644
--- a/tests/robotests/src/com/android/settings/suggestions/SettingsSuggestionsTest.java
+++ b/tests/robotests/src/com/android/settings/suggestions/SettingsSuggestionsTest.java
@@ -97,7 +97,8 @@
final ComponentName componentName = new ComponentName(context, activityName);
final ActivityInfo info;
try {
- info = pm.getActivityInfo(componentName, PackageManager.GET_META_DATA);
+ info = pm.getActivityInfo(componentName, PackageManager.GET_META_DATA
+ | PackageManager.MATCH_DISABLED_COMPONENTS);
} catch (NameNotFoundException e) {
throw new RuntimeException(e);
}