Merge "Use MATCH_ALL to query available browsers."

This commit is contained in:
TreeHugger Robot
2019-02-20 21:31:21 +00:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 5 deletions

View File

@@ -181,11 +181,11 @@ public class DefaultBrowserPreferenceControllerTest {
}
@Test
public void getCandidates_shouldQueryActivityWithFlagsEquals0() {
public void getCandidates_shouldQueryActivityWithMatchAll() {
DefaultBrowserPreferenceController.getCandidates(mPackageManager, 0 /* userId */);
verify(mPackageManager).queryIntentActivitiesAsUser(
any(Intent.class), eq(0) /* flags */, eq(0) /* userId */);
any(Intent.class), eq(PackageManager.MATCH_ALL), eq(0) /* userId */);
}
@Test
@@ -221,6 +221,7 @@ public class DefaultBrowserPreferenceControllerTest {
info.handleAllWebDataURI = true;
info.activityInfo = new ActivityInfo();
info.activityInfo.packageName = packageName;
info.activityInfo.applicationInfo = createApplicationInfo(packageName);
return info;
}