summaryrefslogtreecommitdiff
path: root/src/com/android/customization/model/grid/domain/interactor/GridInteractor.kt
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-13 00:18:39 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-13 00:18:39 +0000
commit3448c3edb1876809aa9ff3e8d441c110aa3c07fb (patch)
treeaba9bb80910323ff849285ab3f1f610e64dc977f /src/com/android/customization/model/grid/domain/interactor/GridInteractor.kt
parent3cc68260bf5367ff502c46322e5673e4b3ad84be (diff)
parentf93898e32e7ae418e8ec7ad25000e2c0a9c8c613 (diff)
downloadThemePicker-3448c3edb1876809aa9ff3e8d441c110aa3c07fb.tar.gz
Snap for 11211409 from f93898e32e7ae418e8ec7ad25000e2c0a9c8c613 to sdk-release
Change-Id: I67b5a8652c40bebba4a83549e0d77d9cd680457c
Diffstat (limited to 'src/com/android/customization/model/grid/domain/interactor/GridInteractor.kt')
-rw-r--r--src/com/android/customization/model/grid/domain/interactor/GridInteractor.kt12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/customization/model/grid/domain/interactor/GridInteractor.kt b/src/com/android/customization/model/grid/domain/interactor/GridInteractor.kt
index cdb679dd..7abd605b 100644
--- a/src/com/android/customization/model/grid/domain/interactor/GridInteractor.kt
+++ b/src/com/android/customization/model/grid/domain/interactor/GridInteractor.kt
@@ -17,6 +17,8 @@
package com.android.customization.model.grid.domain.interactor
+import com.android.customization.model.CustomizationManager
+import com.android.customization.model.grid.GridOption
import com.android.customization.model.grid.data.repository.GridRepository
import com.android.customization.model.grid.shared.model.GridOptionItemModel
import com.android.customization.model.grid.shared.model.GridOptionItemsModel
@@ -73,6 +75,16 @@ class GridInteractor(
}
}
+ fun getSelectOptionNonSuspend(): GridOption? = repository.getSelectedOption()
+
+ fun clearSelectedOption() = repository.clearSelectedOption()
+
+ fun isSelectedOptionApplied() = repository.isSelectedOptionApplied()
+
+ fun applySelectedOption(callback: CustomizationManager.Callback) {
+ repository.applySelectedOption(callback)
+ }
+
private suspend fun reload(): GridOptionItemsModel {
val model = repository.getOptions()
return if (model is GridOptionItemsModel.Loaded) {