summaryrefslogtreecommitdiff
path: root/src/com/android/customization/model/grid/domain/interactor/GridInteractor.kt
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2023-12-08 13:14:23 -0800
committerXin Li <delphij@google.com>2023-12-08 13:14:23 -0800
commitf93898e32e7ae418e8ec7ad25000e2c0a9c8c613 (patch)
treeaba9bb80910323ff849285ab3f1f610e64dc977f /src/com/android/customization/model/grid/domain/interactor/GridInteractor.kt
parent2585ebb7fa1f2fb73dfe2970311b5335311d14d1 (diff)
parent80d19f41337e9e0307bbee74e1c3deac6344e1aa (diff)
downloadThemePicker-f93898e32e7ae418e8ec7ad25000e2c0a9c8c613.tar.gz
Merge Android 14 QPR1
Merged-In: I611902ed3d1588b743c1d58d176874aded5bbd85 Bug: 315507370 Change-Id: Iabf677c7b24d0ce56d98d5ab751d674c01b08892
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) {