Merge "Update wallet setting availability" into tm-qpr-dev am: 61f81ffb07
am: 02cace2f67
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20874103 Change-Id: I7efaad7adeb7f07e36608dda8eb05a72133659fb Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -141,11 +141,29 @@ public class WalletPrivacyPreferenceControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getAvailabilityStatus_noService_returnsDisabled() {
|
||||
public void getAvailabilityStatus_noServiceAndIsSecure_returnsUnsupported() {
|
||||
when(mClient.isWalletServiceAvailable()).thenReturn(false);
|
||||
when(mLockPatternUtils.isSecure(anyInt())).thenReturn(true);
|
||||
|
||||
assertThat(mController.getAvailabilityStatus()).isEqualTo(
|
||||
BasePreferenceController.UNSUPPORTED_ON_DEVICE);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getAvailabilityStatus_hasServiceButNotSecure_returnsDisabled() {
|
||||
when(mClient.isWalletServiceAvailable()).thenReturn(true);
|
||||
when(mLockPatternUtils.isSecure(anyInt())).thenReturn(false);
|
||||
|
||||
assertThat(mController.getAvailabilityStatus()).isEqualTo(
|
||||
BasePreferenceController.DISABLED_DEPENDENT_SETTING);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getAvailabilityStatus_hasServiceAndIsSecure_returnsAvailable() {
|
||||
when(mClient.isWalletServiceAvailable()).thenReturn(true);
|
||||
when(mLockPatternUtils.isSecure(anyInt())).thenReturn(true);
|
||||
|
||||
assertThat(mController.getAvailabilityStatus()).isEqualTo(
|
||||
BasePreferenceController.AVAILABLE);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user