/packages/apps/Settings/tests/unit/src/com/android/settings/wifi/tether/ |
D | WifiHotspotSpeedViewModelTest.java | 73 WifiHotspotSpeedViewModel mViewModel; field in WifiHotspotSpeedViewModelTest 87 mViewModel = new WifiHotspotSpeedViewModel((Application) mContext); in setUp() 88 mViewModel.mSpeedInfoMapData = mSpeedInfoMapData; in setUp() 94 verify(mSpeedType).observeForever(mViewModel.mSpeedTypeObserver); in constructor_observeDataAndSetAutoRefresh() 95 verify(m5gAvailable).observeForever(mViewModel.m5gAvailableObserver); in constructor_observeDataAndSetAutoRefresh() 96 verify(m6gAvailable).observeForever(mViewModel.m6gAvailableObserver); in constructor_observeDataAndSetAutoRefresh() 103 assertThat(mViewModel.mSpeedInfo6g.mIsVisible).isTrue(); in constructor_supported6GHzBand_set6gVisible() 119 mViewModel.onCleared(); in onCleared_removeObserverData() 121 verify(mSpeedType).removeObserver(mViewModel.mSpeedTypeObserver); in onCleared_removeObserverData() 122 verify(m5gAvailable).removeObserver(mViewModel.m5gAvailableObserver); in onCleared_removeObserverData() [all …]
|
D | WifiHotspotSecurityViewModelTest.java | 71 WifiHotspotSecurityViewModel mViewModel; field in WifiHotspotSecurityViewModelTest 82 mViewModel = new WifiHotspotSecurityViewModel((Application) mContext); in setUp() 87 verify(mSecurityType).observeForever(mViewModel.mSecurityTypeObserver); in constructor_observeDataAndSetAutoRefresh() 88 verify(mSpeedType).observeForever(mViewModel.mSpeedTypeObserver); in constructor_observeDataAndSetAutoRefresh() 93 mViewModel.onCleared(); in onCleared_removeObserverData() 95 verify(mSecurityType).removeObserver(mViewModel.mSecurityTypeObserver); in onCleared_removeObserverData() 96 verify(mSpeedType).removeObserver(mViewModel.mSpeedTypeObserver); in onCleared_removeObserverData() 101 mViewModel.onSecurityTypeChanged(SECURITY_TYPE_WPA3_SAE); in onSecurityTypeChanged_securityTypeWpa3_setCheckedCorrectly() 108 mViewModel.onSecurityTypeChanged(SECURITY_TYPE_WPA3_SAE_TRANSITION); in onSecurityTypeChanged_securityTypeWpa2Wpa3_setCheckedCorrectly() 115 mViewModel.onSecurityTypeChanged(SECURITY_TYPE_WPA2_PSK); in onSecurityTypeChanged_securityTypeWpa2_setCheckedCorrectly() [all …]
|
D | WifiTetherViewModelTest.java | 74 WifiTetherViewModel mViewModel; field in WifiTetherViewModelTest 91 mViewModel = new WifiTetherViewModel(mApplication); in setUp() 92 mViewModel.mInstantHotspotSummary = mInstantHotspotSummary; in setUp() 97 verify(mSettingsState).observeForever(mViewModel.mInstantHotspotStateObserver); in constructor_observeData() 102 mViewModel.getSecuritySummary(); in onCleared_removeObservers() 103 mViewModel.getSpeedSummary(); in onCleared_removeObservers() 105 mViewModel.onCleared(); in onCleared_removeObservers() 107 verify(mSecurityType).removeObserver(mViewModel.mSecurityTypeObserver); in onCleared_removeObservers() 108 verify(mSpeedType).removeObserver(mViewModel.mSpeedTypeObserver); in onCleared_removeObservers() 109 verify(mSettingsState).removeObserver(mViewModel.mInstantHotspotStateObserver); in onCleared_removeObservers() [all …]
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/preprovisioning/ |
D | PreProvisioningViewModelTest.java | 57 private PreProvisioningViewModel mViewModel; field in PreProvisioningViewModelTest 69 mViewModel = new PreProvisioningViewModel( in setUp() 77 assertThat(mViewModel.getState().getValue()) in getState_defaultsToInitializing() 85 mViewModel.onReturnFromProvisioning(); in onReturnFromProvisioning_stateIsProvisioningFinalized() 87 assertThat(mViewModel.getState().getValue()) in onReturnFromProvisioning_stateIsProvisioningFinalized() 96 mViewModel.onAdminIntegratedFlowInitiated(); in onAdminIntegratedFlowInitiated_stateIsGettingProvisioningMode() 97 assertThat(mViewModel.getState().getValue()) in onAdminIntegratedFlowInitiated_stateIsGettingProvisioningMode() 106 mViewModel.onShowUserConsent(); in onShowUserConsent_stateIsShowingUserConsent() 108 assertThat(mViewModel.getState().getValue()) in onShowUserConsent_stateIsShowingUserConsent() 117 mViewModel.onProvisioningStartedAfterUserConsent(); in onProvisioningStartedAfterUserConsent_stateIsProvisioningStarted() [all …]
|
D | DownloadRoleHolderViewModelTest.java | 55 private DownloadRoleHolderViewModel mViewModel; field in DownloadRoleHolderViewModelTest 60 mViewModel = new DownloadRoleHolderViewModel( in setUp() 68 assertThat(mViewModel.observeState().getValue()).isEqualTo(STATE_IDLE); in constructor_initialStateIdle() 73 mViewModel.connectToNetworkAndDownloadRoleHolder( in connectToNetworkAndDownloadRoleHolder_goesToDownloadingState() 77 assertThat(mViewModel.observeState().getValue()).isEqualTo(STATE_DOWNLOADING); in connectToNetworkAndDownloadRoleHolder_goesToDownloadingState() 82 mViewModel.provisioningTasksCompleted(); in provisioningTasksCompleted_goesToDownloadedState() 85 assertThat(mViewModel.observeState().getValue()).isEqualTo(STATE_DOWNLOADED); in provisioningTasksCompleted_goesToDownloadedState() 90 mViewModel.error(DIALOG_TITLE_RES_ID, DIALOG_MESSAGE_RES_ID, false); in error_withMessageResId_goesToErrorState() 93 assertThat(mViewModel.observeState().getValue()).isEqualTo(STATE_ERROR); in error_withMessageResId_goesToErrorState() 98 mViewModel.error(DIALOG_TITLE_RES_ID, DIALOG_MESSAGE, false); in error_withMessageText_goesToErrorState() [all …]
|
/packages/apps/Settings/tests/unit/src/com/android/settings/biometrics2/ui/viewmodel/ |
D | FingerprintEnrollFindSensorViewModelTest.java | 43 private FingerprintEnrollFindSensorViewModel mViewModel; field in FingerprintEnrollFindSensorViewModelTest 48 mViewModel = new FingerprintEnrollFindSensorViewModel(mApplication, false); in setUp() 53 mViewModel = new FingerprintEnrollFindSensorViewModel(mApplication, false); in testClickSkipButtonNotInSuw() 54 mViewModel.onSkipButtonClick(); in testClickSkipButtonNotInSuw() 55 assertThat(mViewModel.getActionLiveData().getValue()).isEqualTo( in testClickSkipButtonNotInSuw() 61 mViewModel = new FingerprintEnrollFindSensorViewModel(mApplication, true); in testClickSkipButtonInSuw() 62 mViewModel.onSkipButtonClick(); in testClickSkipButtonInSuw() 63 assertThat(mViewModel.getActionLiveData().getValue()).isEqualTo( in testClickSkipButtonInSuw() 69 mViewModel.onSkipDialogButtonClick(); in testClickSkipDialogButton() 70 assertThat(mViewModel.getActionLiveData().getValue()).isEqualTo( in testClickSkipDialogButton() [all …]
|
D | FingerprintEnrollEnrollingViewModelTest.java | 69 private FingerprintEnrollEnrollingViewModel mViewModel; field in FingerprintEnrollEnrollingViewModelTest 74 mViewModel = new FingerprintEnrollEnrollingViewModel( in setUp() 83 final LiveData<Integer> actionLiveData = mViewModel.getActionLiveData(); in testIconTouchDialog() 86 mViewModel.showIconTouchDialog(); in testIconTouchDialog() 93 final LiveData<Integer> actionLiveData = mViewModel.getActionLiveData(); in tesBackPressedScenario() 95 assertThat(mViewModel.getOnBackPressed()).isEqualTo(false); in tesBackPressedScenario() 97 mViewModel.setOnBackPressed(); in tesBackPressedScenario() 98 assertThat(mViewModel.getOnBackPressed()).isEqualTo(true); in tesBackPressedScenario() 100 mViewModel.onCancelledDueToOnBackPressed(); in tesBackPressedScenario() 101 assertThat(mViewModel.getOnBackPressed()).isEqualTo(false); in tesBackPressedScenario() [all …]
|
D | FingerprintEnrollProgressViewModelTest.java | 76 private FingerprintEnrollProgressViewModel mViewModel; field in FingerprintEnrollProgressViewModelTest 91 mViewModel = new FingerprintEnrollProgressViewModel(mApplication, mFingerprintUpdater, in setUp() 108 mViewModel.setToken(token); in testStartFindSensor() 111 final Object ret = mViewModel.startEnrollment(enrollReason); in testStartFindSensor() 123 mViewModel.setToken(token); in testStartEnrolling() 126 final Object ret = mViewModel.startEnrollment(enrollReason); in testStartEnrolling() 142 mViewModel.setToken(token); in testStartEnrollingWithMessageDisplayController() 145 final Object ret = mViewModel.startEnrollment(enrollReason); in testStartEnrollingWithMessageDisplayController() 156 mViewModel.cancelEnrollment(); in testStartEnrollingWithMessageDisplayController() 157 mViewModel.startEnrollment(enrollReason); in testStartEnrollingWithMessageDisplayController() [all …]
|
D | FingerprintEnrollFinishViewModelTest.java | 62 private FingerprintEnrollFinishViewModel mViewModel; field in FingerprintEnrollFinishViewModelTest 68 mViewModel = new FingerprintEnrollFinishViewModel(mApplication, USER_ID, mRequest, in setUp() 74 mViewModel = new FingerprintEnrollFinishViewModel(mApplication, USER_ID, mRequest, in testCanAssumeSfps() 76 assertThat(mViewModel.canAssumeSfps()).isFalse(); in testCanAssumeSfps() 78 mViewModel = new FingerprintEnrollFinishViewModel(mApplication, USER_ID, mRequest, in testCanAssumeSfps() 80 assertThat(mViewModel.canAssumeSfps()).isFalse(); in testCanAssumeSfps() 82 mViewModel = new FingerprintEnrollFinishViewModel(mApplication, USER_ID, mRequest, in testCanAssumeSfps() 84 assertThat(mViewModel.canAssumeSfps()).isTrue(); in testCanAssumeSfps() 90 assertThat(mViewModel.isAnotherFingerprintEnrollable()).isFalse(); in testIsAnotherFingerprintEnrollable() 93 assertThat(mViewModel.isAnotherFingerprintEnrollable()).isTrue(); in testIsAnotherFingerprintEnrollable() [all …]
|
D | DeviceRotationViewModelTest.java | 43 private TestDeviceRotationViewModel mViewModel; field in DeviceRotationViewModelTest 48 mViewModel = new TestDeviceRotationViewModel(ApplicationProvider.getApplicationContext()); in setUp() 53 assertThat(mViewModel.getLiveData().getValue()).isEqualTo(mViewModel.sTestRotation); in testDefaultLiveDataNotNull() 58 mViewModel.sTestRotation = 3; in testOnDisplayChange() 59 mViewModel.triggerOnDisplayChanged(); in testOnDisplayChange() 60 assertThat(mViewModel.getLiveData().getValue()).isEqualTo(mViewModel.sTestRotation); in testOnDisplayChange()
|
D | DeviceFoldedViewModelTest.java | 40 private DeviceFoldedViewModel mViewModel; field in DeviceFoldedViewModelTest 45 mViewModel = new DeviceFoldedViewModel(new ScreenSizeFoldProvider(application), in setUp() 53 mViewModel.onConfigurationChanged(config1); in testLiveData() 54 assertThat(mViewModel.getLiveData().getValue()).isFalse(); in testLiveData() 58 mViewModel.onConfigurationChanged(config2); in testLiveData() 59 assertThat(mViewModel.getLiveData().getValue()).isTrue(); in testLiveData()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/networkconnection/ |
D | EstablishNetworkConnectionViewModelTest.java | 79 private EstablishNetworkConnectionViewModel mViewModel; field in EstablishNetworkConnectionViewModelTest 156 mViewModel = new EstablishNetworkConnectionViewModel( in setUp() 164 assertThat(mViewModel.observeState().getValue()).isEqualTo(STATE_IDLE); in constructor_initialStateIdle() 169 mViewModel.connectToNetwork(mInstrumentation.getContext(), PARAMS); in connectToNetwork_updatesSharedPreference() 182 mViewModel.connectToNetwork(mInstrumentation.getContext(), PARAMS); in connectToNetwork_goesToConnectingState() 185 assertThat(mViewModel.observeState().getValue()).isEqualTo(STATE_CONNECTING); in connectToNetwork_goesToConnectingState() 190 mViewModel.connectToNetwork( in connectToNetwork_noNetworkDataProvided_goesToPickNetworkState() 194 assertThat(mViewModel.observeState().getValue()).isEqualTo(STATE_SHOW_NETWORK_PICKER); in connectToNetwork_noNetworkDataProvided_goesToPickNetworkState() 199 mViewModel.provisioningTasksCompleted(); in provisioningTasksCompleted_goesToConnectedState() 202 assertThat(mViewModel.observeState().getValue()).isEqualTo(STATE_CONNECTED); in provisioningTasksCompleted_goesToConnectedState() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/handheld/ |
D | ManageStandardPermissionsFragment.java | 48 private ManageStandardPermissionsViewModel mViewModel; field in ManageStandardPermissionsFragment 67 mViewModel = new ViewModelProvider(this, AndroidViewModelFactory.getInstance(application)) in onCreate() 69 mPermissionGroups = mViewModel.getUiDataLiveData().getValue(); in onCreate() 71 mViewModel.getUiDataLiveData().observe(this, permissionGroups -> { in onCreate() 74 mViewModel.getUiDataLiveData().setLoadStaggered(true); in onCreate() 84 if (!mViewModel.getUiDataLiveData().isStale()) { in onCreate() 85 mViewModel.getUiDataLiveData().setFirstLoadGroup(null); in onCreate() 89 mViewModel.getNumCustomPermGroups().observe(this, permNames -> updatePermissionsUi()); in onCreate() 90 mViewModel.getNumAutoRevoked().observe(this, show -> updatePermissionsUi()); in onCreate() 119 if (mViewModel.getNumCustomPermGroups().getValue() != null) { in updatePermissionsUi() [all …]
|
D | AppPermissionFragment.java | 113 private @NonNull AppPermissionViewModel mViewModel; field in AppPermissionFragment 212 mViewModel = new ViewModelProvider(this, factory).get(AppPermissionViewModel.class); in onCreate() 214 mViewModel.getButtonStateLiveData().observe(this, buttonState -> { in onCreate() 222 mViewModel.getDetailResIdLiveData().observe(this, this::setDetail); in onCreate() 223 mViewModel.getShowAdminSupportLiveData().observe(this, this::setAdminSupportDetail); in onCreate() 225 mViewModel.getFullStorageStateLiveData().observe(this, this::setSpecialStorageState); in onCreate() 297 if (mViewModel.getButtonStateLiveData().getValue() != null) { in onCreateView() 298 setRadioButtonsState(mViewModel.getButtonStateLiveData().getValue()); in onCreateView() 313 if (mViewModel.getFullStorageStateLiveData().isInitialized() && mIsStorageGroup) { in onCreateView() 314 setSpecialStorageState(mViewModel.getFullStorageStateLiveData().getValue(), root); in onCreateView() [all …]
|
D | PermissionAppsFragment.java | 115 private PermissionAppsViewModel mViewModel; field in PermissionAppsFragment 136 mViewModel = new ViewModelProvider(this, factory).get(PermissionAppsViewModel.class); in onCreate() 138 mViewModel.getCategorizedAppsLiveData().observe(this, this::onPackagesLoaded); in onCreate() 139 mViewModel.getShouldShowSystemLiveData().observe(this, this::updateMenu); in onCreate() 140 mViewModel.getHasSystemAppsLiveData().observe(this, (Boolean hasSystem) -> in onCreate() 143 if (!mViewModel.arePackagesLoaded()) { in onCreate() 146 if (!mViewModel.arePackagesLoaded()) { in onCreate() 164 long filterTimeBeginMillis = mViewModel.getFilterTimeBeginMillis(); in onCreate() 170 mViewModel.getSensorStatusLiveData().observe(this, this::setSensorStatus); in onCreate() 189 onPackagesLoaded(mViewModel.getCategorizedAppsLiveData().getValue()); in onPermissionUsagesChanged() [all …]
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/preprovisioning/ |
D | PreProvisioningActivityController.java | 147 private final PreProvisioningViewModel mViewModel; field in PreProvisioningActivityController 205 mViewModel = requireNonNull(viewModel); in PreProvisioningActivityController() 253 mViewModel.getRoleHolderState() in startAppropriateProvisioning() 256 mViewModel.onRoleHolderProvisioningInitiated(); in startAppropriateProvisioning() 284 mViewModel.onRoleHolderUpdateInitiated(); in startRoleHolderUpdater() 285 mViewModel.setRoleHolderState(roleHolderState); in startRoleHolderUpdater() 295 startRoleHolderUpdater(isRoleHolderRequestedUpdate, mViewModel.getRoleHolderState()); in startRoleHolderUpdaterWithLastState() 406 ProvisioningParams params = mViewModel.getParams(); in initiateProvisioning() 497 ProvisioningParams params = mViewModel.getParams(); in performPlatformProvidedProvisioning() 502 mViewModel.getTimeLogger().start(); in performPlatformProvidedProvisioning() [all …]
|
/packages/apps/Car/Launcher/app/src/com/android/car/carlauncher/homescreen/audio/media/ |
D | MediaCardPresenter.java | 42 private MediaViewModel mViewModel; field in MediaCardPresenter 52 Intent intent = mViewModel.getIntent(); 65 mFragment.updateHeaderView(mViewModel.getCardHeader()); 68 mFragment.updateContentView(mViewModel.getCardContent()); 72 mCachedCardHeader = mViewModel.getCardHeader(); 75 mCachedCardContent = mViewModel.getCardContent(); 86 mViewModel.setOnProgressUpdateListener(mOnMediaProgressUpdateListener); 87 mViewModel.setOnModelUpdateListener(mOnMediaModelUpdateListener); 88 mViewModel.onCreate(getFragment().requireContext()); 93 mViewModel.onDestroy(getFragment().requireContext()); [all …]
|
/packages/services/Car/car_product/car_ui_portrait/apps/CarUiPortraitLauncher/src/com/android/car/portraitlauncher/controlbar/ |
D | ControlBarMediaController.java | 108 mDataModel, mViewModel.getMediaItemsRepository(), in ControlBarMediaController() 116 mViewModel, mHistoryContainer, R.layout.control_bar_media_history_item, in ControlBarMediaController() 260 if (!hasOverflow && mViewModel.getOverflowExpanded()) { in updatePlaybackState() 273 setOverflowState(mViewModel.getOverflowExpanded()); in setUpActionsOverflowButton() 279 setOverflowState(mViewModel.getOverflowExpanded()); in handleCustomActionsOverflowButtonClicked() 293 setQueueState(mViewModel.getQueueVisible(), /* stateSetThroughClick */ false); in setUpQueueButton() 299 if (isPanelOpen() && mViewModel.getQueueVisible() && !hasQueue) { in updateQueueState() 302 mViewModel.setQueueVisible(false); in updateQueueState() 303 mViewModel.setHistoryVisible(false); in updateQueueState() 312 setQueueState(mViewModel.getQueueVisible(), /* stateSetThroughClick */ true); in handleQueueButtonClicked() [all …]
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batteryusage/ |
D | BatteryChartView.java | 83 private BatteryChartViewModel mViewModel; field in BatteryChartView 129 mViewModel = null; in setViewModel() 141 mViewModel = viewModel; in setViewModel() 188 if (mViewModel != null) { in onMeasure() 190 for (int index = 0; index < mViewModel.size(); index++) { in onMeasure() 191 final String text = mViewModel.getText(index); in onMeasure() 209 if (mViewModel == null) { in draw() 281 if (mViewModel == null) { in getAccessibilityNodeProvider() 292 if (!isValidToDraw(mViewModel, index)) { in onTrapezoidClicked() 298 index == mViewModel.selectedIndex() in onTrapezoidClicked() [all …]
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/ |
D | RetryLaunchViewModelTest.java | 71 private RetryLaunchViewModel mViewModel; field in RetryLaunchViewModelTest 84 mViewModel = createViewModel(); in setUp() 90 mViewModel.tryStartActivity(); in tryStartRoleHolderUpdater_launchUpdater_works() 101 mViewModel.tryStartActivity(); in tryStartRoleHolderUpdater_rescheduleLaunchUpdater_works() 115 mViewModel.tryStartActivity(); in tryStartRoleHolderUpdater_rescheduleLaunchUpdater_exceedsMaxRetryLimit_fails() 128 mViewModel.tryStartActivity(); in stopLaunchRetries_works() 129 mViewModel.stopLaunchRetries(); in stopLaunchRetries_works() 136 mViewModel.markWaitingForActivityResult(); in markWaitingForActivityResult_works() 138 assertThat(mViewModel.isWaitingForActivityResult()).isTrue(); in markWaitingForActivityResult_works() 143 assertThat(mViewModel.isWaitingForActivityResult()).isFalse(); in isWaitingForActivityResult_defaultsToFalse() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/handheld/v31/ |
D | PermissionUsageFragment.java | 84 private PermissionUsageViewModel mViewModel; field in PermissionUsageFragment 109 mViewModel = new ViewModelProvider(this, factory) in onCreate() 122 mViewModel.getPermissionUsagesUiLiveData().observe(this, this::updateAllUI); in onCreate() 201 updateShowSystemToggle(mViewModel.getShowSystemApps()); in onCreateOptionsMenu() 216 updateShow7DaysToggle(mViewModel.getShow7DaysData()); in onCreateOptionsMenu() 235 updateAllUI(mViewModel.updateShowSystem(true)); in onOptionsItemSelected() 238 updateAllUI(mViewModel.updateShowSystem(false)); in onOptionsItemSelected() 241 updateAllUI(mViewModel.updateShow7Days(KotlinUtils.INSTANCE.is7DayToggleEnabled())); in onOptionsItemSelected() 244 updateAllUI(mViewModel.updateShow7Days(false)); in onOptionsItemSelected() 332 mViewModel.getPermissionGroupLabel( in updateAllUI() [all …]
|
D | PermissionUsageDetailsFragment.java | 88 private PermissionUsageDetailsViewModel mViewModel; field in PermissionUsageDetailsFragment 105 mViewModel = in onCreate() 114 mViewModel.updateShowSystemAppsToggle( in onCreate() 116 mViewModel.updateShow7DaysToggle( in onCreate() 128 mViewModel.getPermissionUsagesDetailsInfoUiLiveData().observe(this, this::updateAllUI); in onCreate() 211 if (mViewModel.getShowSystemLiveData().getValue() != null) { in onCreateOptionsMenu() 212 showSystem = mViewModel.getShowSystemLiveData().getValue(); in onCreateOptionsMenu() 230 if (mViewModel.getShow7DaysLiveData().getValue() != null) { in onCreateOptionsMenu() 231 show7Days = mViewModel.getShow7DaysLiveData().getValue(); in onCreateOptionsMenu() 245 mViewModel.updateShowSystemAppsToggle(true); in onOptionsItemSelected() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/television/ |
D | AppPermissionFragment.java | 94 private @NonNull AppPermissionViewModel mViewModel; field in AppPermissionFragment 185 mViewModel = new ViewModelProvider(this, factory).get(AppPermissionViewModel.class); in onCreate() 187 mViewModel.getButtonStateLiveData().observe(this, buttonState -> { in onCreate() 196 mViewModel.getFullStorageStateLiveData().observe(this, this::setSpecialStorageState); in onCreate() 263 if (mViewModel.getButtonStateLiveData().getValue() != null) { in updatePreferences() 264 setRadioButtonsState(mViewModel.getButtonStateLiveData().getValue()); in updatePreferences() 266 if (mViewModel.getFullStorageStateLiveData().isInitialized() && mIsStorageGroup) { in updatePreferences() 267 setSpecialStorageState(mViewModel.getFullStorageStateLiveData().getValue()); in updatePreferences() 273 if (states == null && mViewModel.getButtonStateLiveData().isInitialized()) { in setRadioButtonsState() 285 mViewModel.requestChange(false, this, this, ChangeRequest.GRANT_FOREGROUND, in setRadioButtonsState() [all …]
|
/packages/modules/Bluetooth/android/leaudio/app/src/main/java/com/android/bluetooth/leaudio/ |
D | BroadcastScanActivity.java | 44 private BroadcastScanViewModel mViewModel; field in BroadcastScanActivity 59 mViewModel.scanForBroadcasts(device, false); in onCreate() 63 mViewModel.getAllBroadcasts().getValue()) { in onCreate() 218 mViewModel.addBroadcastSource(device, metadata); in onCreate() 226 mViewModel = ViewModelProviders.of(this).get(BroadcastScanViewModel.class); in onCreate() 227 mViewModel in onCreate() 244 mViewModel.scanForBroadcasts(device, false); in onPause() 251 if (mViewModel.getAllBroadcasts().getValue() != null) in onResume() 252 adapter.setBroadcasts(mViewModel.getAllBroadcasts().getValue()); in onResume() 254 mViewModel.scanForBroadcasts(device, true); in onResume() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/ |
D | DefaultAppListChildFragment.java | 72 private DefaultAppListViewModel mViewModel; field in DefaultAppListChildFragment 88 mViewModel = ViewModelProviders.of(this).get(DefaultAppListViewModel.class); in onActivityCreated() 89 mViewModel.getLiveData().observe(this, roleItems -> onRoleListChanged()); in onActivityCreated() 90 if (mViewModel.hasWorkProfile()) { in onActivityCreated() 91 mViewModel.getWorkLiveData().observe(this, roleItems -> onRoleListChanged()); in onActivityCreated() 93 if (mViewModel.hasPrivateProfile()) { in onActivityCreated() 94 mViewModel.getPrivateLiveData().observe(this, roleItems -> onRoleListChanged()); in onActivityCreated() 99 List<RoleItem> roleItems = mViewModel.getLiveData().getValue(); in onRoleListChanged() 103 boolean hasWorkProfile = mViewModel.hasWorkProfile(); in onRoleListChanged() 106 workRoleItems = mViewModel.getWorkLiveData().getValue(); in onRoleListChanged() [all …]
|