Home
last modified time | relevance | path

Searched refs:UiState (Results 1 – 7 of 7) sorted by relevance

/packages/apps/AvatarPicker/src/tests/common/java/com/android/avatatpicker/tests/
DFakeResultHandler.kt25 import com.android.avatarpicker.ui.details.items.UiState
30 private val _uiState: MutableStateFlow<UiState> = MutableStateFlow(UiState.None())
36 _uiState.value = UiState.Success(result) in onSelect()
39 override fun getSelected() = (uiState.value as? UiState.Success<*>)?.result in getSelected()
42 _uiState.value = UiState.Loading() in getSelected()
46 _uiState.value = UiState.Error(exception) in onError()
50 _uiState.value = UiState.None() in unselect()
/packages/apps/AvatarPicker/src/main/java/com/android/avatarpicker/ui/
DResultHandlerImpl.kt28 import com.android.avatarpicker.ui.details.items.UiState in <lambda>()
37 private val _uiState: MutableStateFlow<UiState> = MutableStateFlow(UiState.None()) in <lambda>()
43 _uiState.value = UiState.Success(result) in <lambda>()
46 override fun getSelected() = (uiState.value as? UiState.Success<*>)?.result in <lambda>()
49 _uiState.value = UiState.Loading() in <lambda>()
53 _uiState.value = UiState.Error(exception) in <lambda>()
57 _uiState.value = UiState.None() in <lambda>()
DResultHandler.kt23 import com.android.avatarpicker.ui.details.items.UiState
29 val uiState: StateFlow<UiState>
DAvatarPickerActivity.kt44 import com.android.avatarpicker.ui.details.items.UiState in <lambda>()
82 BottomActionBar(currentResult is UiState.Success<*>, { in <lambda>()
90 if (currentResult is UiState.Loading) { in <lambda>()
/packages/apps/AvatarPicker/src/main/java/com/android/avatarpicker/ui/details/items/
DUiState.kt21 sealed class UiState : ViewModel() { class
22 class Success<T : SelectableType>(val result: T) : UiState()
23 class Error(val error: Exception) : UiState()
24 class Loading : UiState()
25 class None : UiState()
/packages/apps/AvatarPicker/src/tests/unit/java/com/android/avatarpicker/tests/unit/viewmodel/
DDetailsViewModelTest.kt27 import com.android.avatarpicker.ui.details.items.UiState
126 Truth.assertThat(handler.uiState.value is UiState.None).isTrue() in <lambda>()
129 Truth.assertThat(handler.uiState.value is UiState.Success<*>).isTrue() in <lambda>()
/packages/apps/AvatarPicker/src/main/java/com/android/avatarpicker/ui/details/items/media/
DCameraIcon.kt28 import com.android.avatarpicker.ui.details.items.UiState in <lambda>()