DO NOT MERGE Hide provider from this list if autofill provider
Since we are merging the two lists we should hide the provider from this list to avoid duplicates. Test: local & unit Bug: 279205251 Change-Id: I70ec4a4bda13bdcd5fd8f82f6ba6045e94d5daa9
This commit is contained in:
@@ -122,6 +122,25 @@ public class CredentialManagerPreferenceControllerTest {
|
||||
assertThat(controller.getAvailabilityStatus()).isEqualTo(AVAILABLE);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void verifyHiddenIfAutofillSelectedProvider() {
|
||||
CredentialManagerPreferenceController controller =
|
||||
createControllerWithServices(Collections.emptyList());
|
||||
|
||||
// Set the autofill provider.
|
||||
Settings.Secure.putStringForUser(mContext.getContentResolver(),
|
||||
Settings.Secure.AUTOFILL_SERVICE, "com.example.test/AutofillClass",
|
||||
UserHandle.myUserId());
|
||||
|
||||
// Verify the error cases
|
||||
assertThat(controller.isProviderHiddenBecauseOfAutofill(null)).isFalse();
|
||||
assertThat(controller.isProviderHiddenBecauseOfAutofill("")).isFalse();
|
||||
assertThat(controller.isProviderHiddenBecauseOfAutofill("test")).isFalse();
|
||||
|
||||
// Verify the example.
|
||||
assertThat(controller.isProviderHiddenBecauseOfAutofill("com.example.test")).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void displayPreference_noServices_noPreferencesAdded_useAutofillUri() {
|
||||
Settings.Secure.putStringForUser(
|
||||
|
Reference in New Issue
Block a user