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
This commit is contained in:
@@ -97,7 +97,8 @@ public class SettingsSuggestionsTest {
|
|||||||
final ComponentName componentName = new ComponentName(context, activityName);
|
final ComponentName componentName = new ComponentName(context, activityName);
|
||||||
final ActivityInfo info;
|
final ActivityInfo info;
|
||||||
try {
|
try {
|
||||||
info = pm.getActivityInfo(componentName, PackageManager.GET_META_DATA);
|
info = pm.getActivityInfo(componentName, PackageManager.GET_META_DATA
|
||||||
|
| PackageManager.MATCH_DISABLED_COMPONENTS);
|
||||||
} catch (NameNotFoundException e) {
|
} catch (NameNotFoundException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user