Home
last modified time | relevance | path

Searched refs:mViewModel (Results 1 – 6 of 6) sorted by relevance

/frameworks/base/packages/CredentialManager/wear/robotests/src/com/android/credentialmanager/
DCredentialSelectorViewModelTest.kt54 private val mViewModel = CredentialSelectorViewModel(credentialManagerClient) constant
68 job = checkNotNull(mViewModel).uiState.launchIn(testScope) in setUp()
81 assertThat(mViewModel.uiState.value).isEqualTo(CredentialSelectorUiState.Idle) in Setting state to idle when receiving null request()
89 assertThat(mViewModel.uiState.value) in Setting state to cancel when receiving Cancel request()
98 assertThat(mViewModel.uiState.value).isEqualTo(CredentialSelectorUiState.Create) in Setting state to create when receiving Create request()
106 assertThat(mViewModel.uiState.value).isEqualTo(CredentialSelectorUiState.Close) in Closing app when receiving Close request()
113 mViewModel.updateRequest(intent) in Updates request()
120 mViewModel.openSecondaryScreen() in Back on a single entry screen closes app()
126 mViewModel.back() in Back on a single entry screen closes app()
129 assertThat(mViewModel.uiState.value).isEqualTo(CredentialSelectorUiState.Close) in Back on a single entry screen closes app()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/screenshot/appclips/
DAppClipsViewModelTest.java66 private AppClipsViewModel mViewModel; field in AppClipsViewModelTest
72 mViewModel = new AppClipsViewModel.Factory(mAppClipsCrossProcessHelper, mImageExporter, in setUp()
80 mViewModel.performScreenshot(); in performScreenshot_fails_shouldUpdateErrorWithFailed()
84 assertThat(mViewModel.getErrorLiveData().getValue()) in performScreenshot_fails_shouldUpdateErrorWithFailed()
86 assertThat(mViewModel.getResultLiveData().getValue()).isNull(); in performScreenshot_fails_shouldUpdateErrorWithFailed()
93 mViewModel.performScreenshot(); in performScreenshot_succeeds_shouldUpdateScreenshotWithBitmap()
97 assertThat(mViewModel.getErrorLiveData().getValue()).isNull(); in performScreenshot_succeeds_shouldUpdateScreenshotWithBitmap()
98 assertThat(mViewModel.getScreenshot().getValue()).isEqualTo(FAKE_BITMAP); in performScreenshot_succeeds_shouldUpdateScreenshotWithBitmap()
107 mViewModel.saveScreenshotThenFinish(FAKE_DRAWABLE, FAKE_RECT, USER_HANDLE); in saveScreenshot_throwsError_shouldUpdateErrorWithFailed()
110 assertThat(mViewModel.getErrorLiveData().getValue()) in saveScreenshot_throwsError_shouldUpdateErrorWithFailed()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/appclips/
DAppClipsActivity.java97 private AppClipsViewModel mViewModel; field in AppClipsActivity
165 mViewModel = new ViewModelProvider(this, mViewModelFactory).get(AppClipsViewModel.class); in onCreate()
166 mViewModel.getScreenshot().observe(this, this::setScreenshot); in onCreate()
167 mViewModel.getResultLiveData().observe(this, this::setResultThenFinish); in onCreate()
168 mViewModel.getErrorLiveData().observe(this, this::setErrorThenFinish); in onCreate()
171 mViewModel.performScreenshot(); in onCreate()
189 if (isFinishing() && mViewModel.getErrorLiveData().getValue() == null in onDestroy()
190 && mViewModel.getResultLiveData().getValue() == null) { in onDestroy()
250 mViewModel.saveScreenshotThenFinish(drawable, bounds, getUser()); in saveScreenshotThenFinish()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/complication/
DComplicationHostViewControllerTest.java66 ComplicationCollectionViewModel mViewModel; field in ComplicationHostViewControllerTest
107 when(mViewModel.getComplications()).thenReturn(mComplicationViewModelLiveData); in setup()
125 mViewModel, in setup()
DComplicationViewModelTransformerTest.java53 ComplicationViewModel mViewModel; field in ComplicationViewModelTransformerTest
61 .thenReturn(mViewModel); in setup()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
DKeyguardStatusBarViewControllerTest.java157 private KeyguardStatusBarViewModel mViewModel; field in KeyguardStatusBarViewControllerTest
181 mViewModel = in setup()
215 mViewModel, in createController()