diff options
Diffstat (limited to 'src/com/android/customization/picker/quickaffordance/domain/interactor/KeyguardQuickAffordancePickerInteractor.kt')
-rw-r--r-- | src/com/android/customization/picker/quickaffordance/domain/interactor/KeyguardQuickAffordancePickerInteractor.kt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/customization/picker/quickaffordance/domain/interactor/KeyguardQuickAffordancePickerInteractor.kt b/src/com/android/customization/picker/quickaffordance/domain/interactor/KeyguardQuickAffordancePickerInteractor.kt index 60801943..3eca6241 100644 --- a/src/com/android/customization/picker/quickaffordance/domain/interactor/KeyguardQuickAffordancePickerInteractor.kt +++ b/src/com/android/customization/picker/quickaffordance/domain/interactor/KeyguardQuickAffordancePickerInteractor.kt @@ -64,7 +64,7 @@ class KeyguardQuickAffordancePickerInteractor( } /** Unselects all affordances from the slot with the given ID. */ - suspend fun unselectAll(slotId: String) { + suspend fun unselectAllFromSlot(slotId: String) { client.deleteAllSelections( slotId = slotId, ) @@ -72,6 +72,11 @@ class KeyguardQuickAffordancePickerInteractor( snapshotRestorer.get().storeSnapshot() } + /** Unselects all affordances from all slots. */ + suspend fun unselectAll() { + client.querySlots().forEach { client.deleteAllSelections(it.id) } + } + /** Returns a [Drawable] for the given resource ID, from the system UI package. */ suspend fun getAffordanceIcon( @DrawableRes iconResourceId: Int, |