diff options
| author | 2024-07-15 19:54:59 +0000 | |
|---|---|---|
| committer | 2024-07-15 20:18:08 +0000 | |
| commit | 4af8bbdf2701076d5c2d4cf9559b13180d39b5f0 (patch) | |
| tree | 0153951d2761c49ea377c33c22d2fd2ef0241cb5 | |
| parent | 78f735a9fe55e8f900e5937c14a75f387538bfb0 (diff) | |
Updated widgetAccessibilityDelegate in communal view model to perform Accessibility Action
Test: Device Tested
Flag: NONE Accessibility changes
Fixes: 346919444 347128368
Change-Id: I6194474797edff89feb9a7b91f6960cefd2323eb
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt index 780bf70f3f7b..836c4c0b5353 100644 --- a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt @@ -17,6 +17,7 @@ package com.android.systemui.communal.ui.viewmodel import android.content.res.Resources +import android.os.Bundle import android.view.View import android.view.accessibility.AccessibilityNodeInfo import com.android.systemui.communal.domain.interactor.CommunalInteractor @@ -209,6 +210,20 @@ constructor( ) ) } + + override fun performAccessibilityAction( + host: View, + action: Int, + args: Bundle? + ): Boolean { + when (action) { + AccessibilityNodeInfo.AccessibilityAction.ACTION_LONG_CLICK.id -> { + onOpenWidgetEditor() + return true + } + } + return super.performAccessibilityAction(host, action, args) + } } private val _isEnableWidgetDialogShowing: MutableStateFlow<Boolean> = MutableStateFlow(false) |