/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/src/com/android/settings/network/ |
D | AirplaneModePreferenceController.java | 66 if (isAvailable(mContext)) { in AirplaneModePreferenceController() 82 if (KEY_AIRPLANE_MODE.equals(preference.getKey()) && isAvailable() in handlePreferenceTreeClick() 107 public static boolean isAvailable(Context context) { in isAvailable() method in AirplaneModePreferenceController 120 return isAvailable(mContext) ? AVAILABLE : UNSUPPORTED_ON_DEVICE; in getAvailabilityStatus() 130 if (isAvailable()) { in onStart() 137 if (isAvailable()) { in onStop() 144 if (isAvailable()) { in onDestroy() 151 if (requestCode == REQUEST_CODE_EXIT_ECM && isAvailable()) { in onActivityResult() 161 return isAvailable() && mAirplaneModeEnabler.isAirplaneModeOn(); in isChecked() 169 if (isAvailable()) { in setChecked()
|
/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/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/ThemePicker/tests/robotests/src/com/android/customization/model/theme/ |
D | ThemeManagerTest.java | 131 when(mThemeBundleProvider.isAvailable()).thenReturn(true); in isAvailable_ThemeBundleProviderAndOverlayManagerAreAvailable_ReturnsTrue() 132 when(mMockOm.isAvailable()).thenReturn(true); in isAvailable_ThemeBundleProviderAndOverlayManagerAreAvailable_ReturnsTrue() 134 assertTrue(mThemeManager.isAvailable()); in isAvailable_ThemeBundleProviderAndOverlayManagerAreAvailable_ReturnsTrue() 139 when(mThemeBundleProvider.isAvailable()).thenReturn(false); in isAvailable_ThemeBundleProviderOrOverlayManagerIsAvailable_ReturnsFalse() 140 when(mMockOm.isAvailable()).thenReturn(true); in isAvailable_ThemeBundleProviderOrOverlayManagerIsAvailable_ReturnsFalse() 141 assertFalse(mThemeManager.isAvailable()); in isAvailable_ThemeBundleProviderOrOverlayManagerIsAvailable_ReturnsFalse() 143 when(mThemeBundleProvider.isAvailable()).thenReturn(true); in isAvailable_ThemeBundleProviderOrOverlayManagerIsAvailable_ReturnsFalse() 144 when(mMockOm.isAvailable()).thenReturn(false); in isAvailable_ThemeBundleProviderOrOverlayManagerIsAvailable_ReturnsFalse() 145 assertFalse(mThemeManager.isAvailable()); in isAvailable_ThemeBundleProviderOrOverlayManagerIsAvailable_ReturnsFalse()
|
/packages/apps/Settings/src/com/android/settings/gestures/ |
D | AssistGestureSettingsPreferenceController.java | 55 mWasAvailable = isAvailable(); in AssistGestureSettingsPreferenceController() 62 final boolean isAvailable = mAssistOnly ? isSupported : isSensorAvailable; in getAvailabilityStatus() 65 return isAvailable ? AVAILABLE : UNSUPPORTED_ON_DEVICE; in getAvailabilityStatus() 77 if (mWasAvailable != isAvailable()) { in onStart() 81 mWasAvailable = isAvailable(); in onStart() 95 if (isAvailable()) { in updatePreference()
|
D | GesturesSettingPreferenceController.java | 51 boolean isAvailable = false; in getAvailabilityStatus() 53 isAvailable = isAvailable || controller.isAvailable(); in getAvailabilityStatus() 55 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/apps/Settings/tests/robotests/src/com/android/settings/notification/app/ |
D | BubbleSummaryPreferenceControllerTest.java | 85 mController.isAvailable(); in isAvailable_noOnResume_shouldNotCrash() 94 assertFalse(mController.isAvailable()); in isAvailable_appBlocked_shouldReturnFalse() 102 assertTrue(mController.isAvailable()); in isAvailable_NOTIFICATION_BUBBLESisOn_shouldReturnTrue() 111 assertFalse(mController.isAvailable()); in isAvailable_NOTIFICATION_BUBBLESisOn_neverSentBubble_shouldReturnFalse() 120 assertFalse(mController.isAvailable()); in isAvailable_NOTIFICATION_BUBBLESisOff_shouldReturnFalse() 131 assertFalse(mController.isAvailable()); in isAvailable_nonNullChannelNOTIFICATION_BUBBLESisOff_shouldReturnFalse() 142 assertTrue(mController.isAvailable()); in isAvailable_defaultChannelNOTIFICATION_BUBBLESisOn_shouldReturnTrue() 153 assertFalse(mController.isAvailable()); in isAvailable_lowRam_shouldReturnFalse() 164 assertTrue(mController.isAvailable()); in isAvailable_notLowRam_shouldReturnTrue()
|
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 | 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 | 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 | 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 | 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 | 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()
|
D | ConversationDemotePreferenceControllerTest.java | 77 mController.isAvailable(); in testNoCrashIfNoOnResume() 87 assertFalse(mController.isAvailable()); in testIsAvailable_notConversation() 97 assertFalse(mController.isAvailable()); in testIsAvailable_conversation_demoted() 107 assertTrue(mController.isAvailable()); in testIsAvailable_conversation_notDemoted() 118 assertTrue(mController.isAvailable()); in testIsAvailable_filteredIn() 128 assertFalse(mController.isAvailable()); in testIsAvailable_filteredOut()
|
D | BubblePreferenceControllerTest.java | 120 mController.isAvailable(); in testNoCrashIfNoOnResume() 131 assertFalse(mController.isAvailable()); in isAvailable_notIfAppBlocked() 141 assertFalse(mController.isAvailable()); in isAvailable_notIfChannelBlocked() 153 assertFalse(mController.isAvailable()); in isAvailable_channel_notIfAppOff() 163 assertFalse(mController.isAvailable()); in isNotAvailable_ifOffGlobally_app() 174 assertFalse(mController.isAvailable()); in isNotAvailable_ifLowRam() 187 assertFalse(mController.isAvailable()); in isAvailable_notIfOffGlobally_channel() 199 assertTrue(mController.isAvailable()); in isAvailable_ifNotLowRam() 209 assertTrue(mAppPageController.isAvailable()); in isAvailable_app_evenIfOffGlobally() 218 assertTrue(mController.isAvailable()); in isAvailable_app() [all …]
|
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()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/ |
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/modules/Bluetooth/framework/java/android/bluetooth/ |
D | BluetoothHapPresetInfo.java | 46 boolean isWritable, boolean isAvailable) { in BluetoothHapPresetInfo() argument 50 this.mIsAvailable = isAvailable; in BluetoothHapPresetInfo() 97 public boolean isAvailable() { in isAvailable() method in BluetoothHapPresetInfo 179 public @NonNull Builder setAvailable(boolean isAvailable) { in setAvailable() argument 180 mIsAvailable = isAvailable; in setAvailable()
|
/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/Car/Settings/src/com/android/car/settings/bluetooth/ |
D | BluetoothBondedDevicesPreferenceController.java | 272 boolean isAvailable) { in updatePhoneActionItemAvailability() argument 276 phoneItem.setEnabled(isAvailable && !hasDisallowConfigRestriction()); in updatePhoneActionItemAvailability() 277 phoneItem.setDrawable(getContext(), isAvailable in updatePhoneActionItemAvailability() 279 phoneItem.setRestricted(!isAvailable && mHasUxRestriction); in updatePhoneActionItemAvailability() 284 boolean isAvailable) { in updateMediaActionItemAvailability() argument 288 mediaItem.setEnabled(isAvailable && !hasDisallowConfigRestriction()); in updateMediaActionItemAvailability() 289 mediaItem.setDrawable(getContext(), isAvailable in updateMediaActionItemAvailability() 291 mediaItem.setRestricted(!isAvailable && mHasUxRestriction); in updateMediaActionItemAvailability()
|
/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()
|