Add dialog for enabling a provider in settings

Test: manual
Bug: 277923170
Change-Id: I404444115f178faf5545dec9686096fcdfdf73de
This commit is contained in:
Becca Hughes
2023-04-12 19:03:17 +00:00
parent 00ac6a4e58
commit 7d407abf58
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);
}