Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4af8bbdf authored by Prince's avatar Prince
Browse files

Updated widgetAccessibilityDelegate in communal view model to perform Accessibility Action

Test: Device Tested
Flag: NONE Accessibility changes
Fixes: 346919444 347128368
Change-Id: I6194474797edff89feb9a7b91f6960cefd2323eb
parent 78f735a9
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -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)