Merge "Add dialog for enabling a provider in settings"

This commit is contained in:
Treehugger Robot
2023-04-13 23:24:44 +00:00
committed by Android (Google) Code Review
3 changed files with 39 additions and 32 deletions

View File

@@ -390,7 +390,7 @@ public class CredentialManagerPreferenceControllerTest {
Intent intent = new Intent(Settings.ACTION_CREDENTIAL_PROVIDER);
intent.setData(Uri.parse("package:" + packageName));
assertThat(controller.verifyReceivedIntent(intent)).isTrue();
controller.completeEnableProviderDialogBox(DialogInterface.BUTTON_POSITIVE, packageName);
controller.completeEnableProviderDialogBox(DialogInterface.BUTTON_POSITIVE, packageName, true);
assertThat(mReceivedResultCode.get()).isEqualTo(Activity.RESULT_OK);
}
@@ -405,7 +405,7 @@ public class CredentialManagerPreferenceControllerTest {
Intent intent = new Intent(Settings.ACTION_CREDENTIAL_PROVIDER);
intent.setData(Uri.parse("package:" + packageName));
assertThat(controller.verifyReceivedIntent(intent)).isTrue();
controller.completeEnableProviderDialogBox(DialogInterface.BUTTON_NEGATIVE, packageName);
controller.completeEnableProviderDialogBox(DialogInterface.BUTTON_NEGATIVE, packageName, true);
assertThat(mReceivedResultCode.get()).isEqualTo(Activity.RESULT_CANCELED);
}