/packages/apps/Settings/tests/robotests/src/com/android/settings/security/ |
D | RestrictedEncryptionPreferenceControllerTest.java | 73 assertThat(mInstallCertificatePreferenceController.isAvailable()).isTrue(); in isAvailable_noRestriction_shouldReturnTrue() 74 assertThat(mResetCredentialsPreferenceController.isAvailable()).isTrue(); in isAvailable_noRestriction_shouldReturnTrue() 75 assertThat(mUserCredentialsPreferenceController.isAvailable()).isTrue(); in isAvailable_noRestriction_shouldReturnTrue() 76 assertThat(mInstallCaCertificatePreferenceController.isAvailable()).isTrue(); in isAvailable_noRestriction_shouldReturnTrue() 77 assertThat(mInstallUserCertificatePreferenceController.isAvailable()).isTrue(); in isAvailable_noRestriction_shouldReturnTrue() 78 assertThat(mInstallWifiCertificatePreferenceController.isAvailable()).isTrue(); in isAvailable_noRestriction_shouldReturnTrue() 85 assertThat(mInstallCertificatePreferenceController.isAvailable()).isFalse(); in isAvailable_hasRestriction_shouldReturnFalse() 86 assertThat(mResetCredentialsPreferenceController.isAvailable()).isFalse(); in isAvailable_hasRestriction_shouldReturnFalse() 87 assertThat(mUserCredentialsPreferenceController.isAvailable()).isFalse(); in isAvailable_hasRestriction_shouldReturnFalse()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/network/ |
D | NetworkMobileProviderControllerTest.java | 99 when(mSubscriptionsController.isAvailable()).thenReturn(true); in testDisplayPreference_subscriptionsControllerAvailable() 107 when(mSubscriptionsController.isAvailable()).thenReturn(false); in testDisplayPreference_subscriptionsControllerUnAvailable() 115 when(mSubscriptionsController.isAvailable()).thenReturn(false); in testGetAvailabilityStatus_subscriptionsControllerIsNull() 132 when(mSubscriptionsController.isAvailable()).thenReturn(true); in testGetAvailabilityStatus_subscriptionsControllerAvailable() 142 when(mSubscriptionsController.isAvailable()).thenReturn(true); in testOnChildUpdated_subscriptionsControllerAvailable_categoryIsVisible() 154 when(mSubscriptionsController.isAvailable()).thenReturn(false); in testOnChildUpdated_subscriptionsControllerUnavailable_categoryIsInvisible() 166 when(mSubscriptionsController.isAvailable()).thenReturn(true); in testOnChildUpdated_noExpandedChildCountAndAvailable_doesNotSetExpandedCount() 177 when(mSubscriptionsController.isAvailable()).thenReturn(true); in hidePreference_hidePreferenceTrue_preferenceIsNotVisible() 188 when(mSubscriptionsController.isAvailable()).thenReturn(true); in hidePreference_hidePreferenceFalse_preferenceIsVisible() 198 when(mSubscriptionsController.isAvailable()).thenReturn(true); in hidePreference_hidePreferenceFalse_preferenceIsNotVisibleImmediately()
|
/packages/apps/Settings/src/com/android/settings/network/ |
D | AirplaneModePreferenceController.java | 80 if (isAvailable(mContext)) { in AirplaneModePreferenceController() 97 if (KEY_AIRPLANE_MODE.equals(preference.getKey()) && isAvailable()) { in handlePreferenceTreeClick() 133 public static boolean isAvailable(Context context) { in isAvailable() method in AirplaneModePreferenceController 146 return isAvailable(mContext) ? AVAILABLE : UNSUPPORTED_ON_DEVICE; in getAvailabilityStatus() 156 if (isAvailable()) { in onStart() 174 if (isAvailable()) { in onStop() 181 if (isAvailable()) { in onDestroy() 188 if (requestCode == REQUEST_CODE_EXIT_ECM && isAvailable()) { in onActivityResult() 198 return isAvailable() && mAirplaneModeEnabler.isAirplaneModeOn(); in isChecked() 206 if (isAvailable()) { in setChecked()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/biometrics/fingerprint/ |
D | FingerprintSettingsUnlockCategoryControllerTest.java | 82 assertThat(mController.isAvailable()).isEqualTo(false); in isAvailable_isEnabled_whenSfpsHardwareDetected_AndHasEnrolledFingerprints() 88 assertThat(mController.isAvailable()).isEqualTo(true); in isAvailable_isEnabled_whenSfpsHardwareDetected_AndHasEnrolledFingerprints() 94 assertThat(mController.isAvailable()).isEqualTo(false); in isUnavailable_isDisabled_whenSfpsHardwareDetected_AndNoEnrolledFingerprints() 100 assertThat(mController.isAvailable()).isEqualTo(false); in isUnavailable_isDisabled_whenSfpsHardwareDetected_AndNoEnrolledFingerprints() 106 assertThat(mController.isAvailable()).isFalse(); in isUnavailable_whenHardwareNotDetected() 112 assertThat(mController.isAvailable()).isEqualTo(false); in isUnavailable_whenHardwareNotDetected() 118 assertThat(mController.isAvailable()).isFalse(); in isUnavailable_onNonSfpsDevice() 124 assertThat(mController.isAvailable()).isFalse(); in isUnavailable_onNonSfpsDevice()
|
D | FingerprintSettingsRequireScreenOnToAuthPreferenceControllerTest.java | 95 assertThat(mController.isAvailable()).isEqualTo(false); in isAvailable_isEnabled_whenSfpsHardwareDetected_AndHasEnrolledFingerprints() 101 assertThat(mController.isAvailable()).isEqualTo(true); in isAvailable_isEnabled_whenSfpsHardwareDetected_AndHasEnrolledFingerprints() 107 assertThat(mController.isAvailable()).isEqualTo(false); in isUnavailable_isDisabled_whenSfpsHardwareDetected_AndNoEnrolledFingerprints() 113 assertThat(mController.isAvailable()).isEqualTo(false); in isUnavailable_isDisabled_whenSfpsHardwareDetected_AndNoEnrolledFingerprints() 119 assertThat(mController.isAvailable()).isFalse(); in isUnavailable_whenHardwareNotDetected() 125 assertThat(mController.isAvailable()).isEqualTo(false); in isUnavailable_whenHardwareNotDetected() 131 assertThat(mController.isAvailable()).isFalse(); in isUnavailable_onNonSfpsDevice() 137 assertThat(mController.isAvailable()).isFalse(); in isUnavailable_onNonSfpsDevice()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/ |
D | BluetoothDetailsHearingDeviceControllerTest.java | 75 when(mHearingDeviceSettingsController.isAvailable()).thenReturn(true); in isAvailable_hearingDeviceSettingsAvailable_returnTrue() 77 assertThat(mHearingDeviceController.isAvailable()).isTrue(); in isAvailable_hearingDeviceSettingsAvailable_returnTrue() 82 when(mPresetsController.isAvailable()).thenReturn(true); in isAvailable_presetsControlsAvailable_returnTrue() 84 assertThat(mHearingDeviceController.isAvailable()).isTrue(); in isAvailable_presetsControlsAvailable_returnTrue() 89 when(mHearingDeviceSettingsController.isAvailable()).thenReturn(false); in isAvailable_noControllersAvailable_returnFalse() 90 when(mPresetsController.isAvailable()).thenReturn(false); in isAvailable_noControllersAvailable_returnFalse() 92 assertThat(mHearingDeviceController.isAvailable()).isFalse(); in isAvailable_noControllersAvailable_returnFalse()
|
D | BluetoothDetailsPairOtherControllerTest.java | 113 assertThat(mController.isAvailable()).isFalse(); in isAvailable_deviceIsNotConnectedHearingAid_notAvailable() 129 assertThat(mController.isAvailable()).isFalse(); in isAvailable_deviceIsConnectedHearingAid_isMonaural_notAvailable() 148 assertThat(mController.isAvailable()).isFalse(); in isAvailable_deviceIsConnectedHearingAid_subDeviceIsBonded_notAvailable() 167 assertThat(mController.isAvailable()).isTrue(); in isAvailable_deviceIsConnectedHearingAid_subDeviceIsNotBonded_available() 186 assertThat(mController.isAvailable()).isFalse(); in isAvailable_deviceIsConnectedHearingAid_memberDeviceIsBonded_notAvailable() 205 assertThat(mController.isAvailable()).isTrue(); in isAvailable_deviceIsConnectedHearingAid_memberDeviceIsNotBonded_available() 224 assertThat(mController.isAvailable()).isTrue(); in isAvailable_deviceIsConnectedHearingAid_otherDeviceIsNotExist_available()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/ |
D | GameDefaultFrameRatePreferenceControllerTest.java | 83 assertTrue(mController.isAvailable()); in onPreferenceChange_settingEnabled_shouldChecked() 96 assertTrue(mController.isAvailable()); in onPreferenceChange_settingDisabled_shouldUnchecked() 108 assertTrue(mController.isAvailable()); in updateState_settingEnabled_shouldChecked() 120 assertTrue(mController.isAvailable()); in updateState_settingDisabled_shouldUnchecked() 134 assertFalse(mController.isAvailable()); in settingNotAvailable_flagsOff() 142 assertTrue(mController.isAvailable()); in settingAvailable_flagsOn() 153 assertTrue(mController.isAvailable()); in onDeveloperOptionsSwitchDisabled_preferenceUnchecked_shouldNotTurnOffPreference() 169 assertTrue(mController.isAvailable()); in onDeveloperOptionsSwitchDisabled_preferenceChecked_shouldTurnOffPreference()
|
D | ShowHdrSdrRatioPreferenceControllerTest.java | 79 assertTrue(mController.isAvailable()); in onPreferenceChange_settingEnabled_shouldChecked() 91 assertTrue(mController.isAvailable()); in onPreferenceChange_settingDisabled_shouldUnchecked() 103 assertTrue(mController.isAvailable()); in updateState_settingEnabled_shouldChecked() 115 assertTrue(mController.isAvailable()); in updateState_settingDisabled_shouldUnchecked() 127 assertFalse(mController.isAvailable()); in settingNotAvailable_isHdrSdrRatioAvailableFalse_flagsOff() 134 assertFalse(mController.isAvailable()); in settingNotAvailable_isHdrSdrRatioAvailableTrue_flagsOn() 142 assertTrue(mController.isAvailable()); in onDeveloperOptionsSwitchDisabled_preferenceUnchecked_shouldNotTurnOffPreference() 159 assertTrue(mController.isAvailable()); in onDeveloperOptionsSwitchDisabled_preferenceChecked_shouldTurnOffPreference()
|
D | PictureColorModePreferenceControllerTest.java | 80 assertThat(mController.isAvailable()).isFalse(); in isAvailable_shouldReturnFalseWhenWideColorGambit() 89 assertThat(mController.isAvailable()).isTrue(); in isAvailable_shouldReturnTrueWhenNotWideColorGambit() 98 assertThat(mController.isAvailable()).isFalse(); in isAvailable_shouldReturnFalseWhenColorCountIsOne() 107 assertThat(mController.isAvailable()).isTrue(); in isAvailable_shouldReturnTrueWhenColorCountIsTwo() 113 doReturn(true).when(mController).isAvailable(); in onDeveloperOptionEnabled_shouldEnablePreference() 122 doReturn(true).when(mController).isAvailable(); in onDeveloperOptionDisabled_shouldDisablePreference()
|
/packages/apps/Settings/src/com/android/settings/gestures/ |
D | GesturesSettingPreferenceController.java | 44 boolean isAvailable = false; in getAvailabilityStatus() 46 isAvailable = isAvailable || controller.isAvailable(); in getAvailabilityStatus() 48 return isAvailable ? AVAILABLE : UNSUPPORTED_ON_DEVICE; in getAvailabilityStatus()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/widget/ |
D | PreferenceCategoryControllerTest.java | 54 assertThat(mController.isAvailable()).isFalse(); in isAvailable_noChildren_false() 60 when(child.isAvailable()).thenReturn(true); in isAvailable_childrenAvailable_true() 64 assertThat(mController.isAvailable()).isTrue(); in isAvailable_childrenAvailable_true() 70 when(child.isAvailable()).thenReturn(false); in isAvailable_childrenUnavailable_false() 74 assertThat(mController.isAvailable()).isFalse(); in isAvailable_childrenUnavailable_false()
|
/packages/modules/Bluetooth/framework/java/android/bluetooth/ |
D | BluetoothHapPresetInfo.java | 47 int presetIndex, @NonNull String presetName, boolean isWritable, boolean isAvailable) { in BluetoothHapPresetInfo() argument 51 this.mIsAvailable = isAvailable; in BluetoothHapPresetInfo() 98 public boolean isAvailable() { in isAvailable() method in BluetoothHapPresetInfo 181 public @NonNull Builder setAvailable(boolean isAvailable) { in setAvailable() argument 182 mIsAvailable = isAvailable; in setAvailable()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/app/ |
D | BubbleSummaryPreferenceControllerTest.java | 93 mController.isAvailable(); in isAvailable_noOnResume_shouldNotCrash() 102 assertFalse(mController.isAvailable()); in isAvailable_appBlocked_shouldReturnFalse() 110 assertTrue(mController.isAvailable()); in isAvailable_NOTIFICATION_BUBBLESisOn_shouldReturnTrue() 119 assertFalse(mController.isAvailable()); in isAvailable_NOTIFICATION_BUBBLESisOn_neverSentBubble_shouldReturnFalse() 128 assertFalse(mController.isAvailable()); in isAvailable_NOTIFICATION_BUBBLESisOff_shouldReturnFalse() 139 assertFalse(mController.isAvailable()); in isAvailable_nonNullChannelNOTIFICATION_BUBBLESisOff_shouldReturnFalse() 150 assertTrue(mController.isAvailable()); in isAvailable_defaultChannelNOTIFICATION_BUBBLESisOn_shouldReturnTrue() 159 assertFalse(mController.isAvailable()); in isAvailable_lowRam_shouldReturnFalse() 168 assertTrue(mController.isAvailable()); in isAvailable_notLowRam_shouldReturnTrue()
|
D | AppLinkPreferenceControllerTest.java | 72 mController.isAvailable(); in testNoCrashIfNoOnResume() 79 assertFalse(mController.isAvailable()); in testIsAvailable_notIfNull() 87 assertFalse(mController.isAvailable()); in testIsAvailable_notIfAppBlocked() 96 assertFalse(mController.isAvailable()); in testIsAvailable_notIfChannelBlocked() 106 assertFalse(mController.isAvailable()); in testIsAvailable_notNoIntent() 117 assertTrue(mController.isAvailable()); in testIsAvailable()
|
D | DeletedChannelsPreferenceControllerTest.java | 76 mController.isAvailable(); in noCrashIfNoOnResume() 85 assertFalse(mController.isAvailable()); in isAvailable_appScreen_notIfAppBlocked() 93 assertFalse(mController.isAvailable()); in isAvailable_groupScreen_never() 101 assertFalse(mController.isAvailable()); in isAvailable_channelScreen_never() 108 assertFalse(mController.isAvailable()); in isAvailable_appScreen_notIfNoDeletedChannels() 116 assertTrue(mController.isAvailable()); in isAvailable_appScreen()
|
D | BadgePreferenceControllerTest.java | 92 mController.isAvailable(); in testNoCrashIfNoOnResume() 103 assertFalse(mController.isAvailable()); in testIsAvailable_notIfAppBlocked() 113 assertFalse(mController.isAvailable()); in testIsAvailable_notIfChannelBlocked() 125 assertFalse(mController.isAvailable()); in testIsAvailable_channel_notIfAppOff() 137 assertFalse(mController.isAvailable()); in testIsAvailable_notIfOffGlobally() 147 assertTrue(mController.isAvailable()); in testIsAvailable_app() 157 assertFalse(mController.isAvailable()); in testIsAvailable_appNoChannels() 171 assertTrue(mController.isAvailable()); in testIsAvailable_defaultChannel() 184 assertTrue(mController.isAvailable()); in testIsAvailable_channel() 196 assertFalse(mController.isAvailable()); in testIsAvailable_channelAppOff() [all …]
|
D | LightsPreferenceControllerTest.java | 105 mController.isAvailable(); in testNoCrashIfNoOnResume() 117 assertFalse(mController.isAvailable()); in testIsAvailable_notIfConfigNotAllowed() 126 assertFalse(mController.isAvailable()); in testIsAvailable_notIfSettingNotAllowed() 134 assertFalse(mController.isAvailable()); in testIsAvailable_notIfNotImportant() 143 assertFalse(mController.isAvailable()); in testIsAvailable_notIfDefaultChannel() 151 assertTrue(mController.isAvailable()); in testIsAvailable() 160 assertTrue(mController.isAvailable()); in testIsAvailable_filteredIn() 168 assertFalse(mController.isAvailable()); in testIsAvailable_filteredOut()
|
D | MinImportancePreferenceControllerTest.java | 89 mController.isAvailable(); in testNoCrashIfNoOnResume() 96 assertFalse(mController.isAvailable()); in testIsAvailable_notIfNull() 104 assertFalse(mController.isAvailable()); in testIsAvailable_ifAppBlocked() 113 assertFalse(mController.isAvailable()); in testIsAvailable_notIfChannelBlocked() 123 assertFalse(mController.isAvailable()); in testIsAvailable_notForDefaultChannel() 132 assertTrue(mController.isAvailable()); in testIsAvailable() 142 assertTrue(mController.isAvailable()); in testIsAvailable_filteredIn() 151 assertFalse(mController.isAvailable()); in testIsAvailable_filteredOut()
|
D | HighImportancePreferenceControllerTest.java | 89 mController.isAvailable(); in testNoCrashIfNoOnResume() 96 assertFalse(mController.isAvailable()); in testIsAvailable_notIfNull() 104 assertFalse(mController.isAvailable()); in testIsAvailable_ifAppBlocked() 113 assertFalse(mController.isAvailable()); in testIsAvailable_notIfChannelBlocked() 123 assertFalse(mController.isAvailable()); in testIsAvailable_notForDefaultChannel() 132 assertTrue(mController.isAvailable()); in testIsAvailable() 142 assertTrue(mController.isAvailable()); in testIsAvailable_filteredIn() 151 assertFalse(mController.isAvailable()); in testIsAvailable_filteredOut()
|
D | AddToHomeScreenPreferenceControllerTest.java | 68 mController.isAvailable(); in testNoCrashIfNoOnResume() 75 assertFalse(mController.isAvailable()); in testIsAvailable_notIfNull() 83 assertTrue(mController.isAvailable()); in testIsAvailable() 92 assertTrue(mController.isAvailable()); in testIsAvailable_filteredIn() 101 assertFalse(mController.isAvailable()); in testIsAvailable_filteredOut()
|
D | ImportancePreferenceControllerTest.java | 95 mController.isAvailable(); in testNoCrashIfNoOnResume() 102 assertFalse(mController.isAvailable()); in testIsAvailable_notIfNull() 110 assertFalse(mController.isAvailable()); in testIsAvailable_ifAppBlocked() 121 assertFalse(mController.isAvailable()); in testIsAvailable_isGroupBlocked() 130 assertFalse(mController.isAvailable()); in testIsAvailable_ifChannelBlocked() 140 assertFalse(mController.isAvailable()); in testIsAvailable_notForDefaultChannel() 149 assertTrue(mController.isAvailable()); in testIsAvailable() 159 assertTrue(mController.isAvailable()); in testIsAvailable_filteredIn() 168 assertFalse(mController.isAvailable()); in testIsAvailable_filteredOut()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/zen/ |
D | ZenRuleStarredContactsPreferenceControllerTest.java | 111 assertThat(mCallsController.isAvailable()).isFalse(); in isAvailable_noCallers() 121 assertThat(mCallsController.isAvailable()).isFalse(); in isAvailable_anyCallers() 131 assertThat(mCallsController.isAvailable()).isTrue(); in isAvailable_starredCallers() 140 assertThat(mCallsController.isAvailable()).isFalse(); in isAvailable_noMessages() 150 assertThat(mMessagesController.isAvailable()).isFalse(); in isAvailable_anyMessages() 160 assertThat(mMessagesController.isAvailable()).isTrue(); in isAvailable_starredMessageContacts()
|
/packages/apps/Settings/src/com/android/settings/deviceinfo/ |
D | FeedbackPreferenceController.java | 43 public boolean isAvailable() { in isAvailable() method in FeedbackPreferenceController 56 if (isAvailable() && !preference.isVisible()) { in updateState() 58 } else if (!isAvailable() && preference.isVisible()){ in updateState() 71 if (!this.isAvailable()) { in handlePreferenceTreeClick()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/network/telephony/ |
D | NrDisabledInDsdsFooterPreferenceControllerTest.java | 64 assertThat(mController.isAvailable()).isFalse(); in isAvailable_noInit_notAvailable() 74 assertThat(mController.isAvailable()).isTrue(); in isAvailable_dataOnAndDsdsAnd5GSupported_Available() 84 assertThat(mController.isAvailable()).isFalse(); in isAvailable_5gNotSupported_notAvailable() 94 assertThat(mController.isAvailable()).isFalse(); in isAvailable_mobileDataOff_notAvailable() 104 assertThat(mController.isAvailable()).isFalse(); in isAvailable_singleSimMode_notAvailable()
|