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

Commit 14b3cc4f authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

If deviceEntryIconView isn't visible, clickable=false

In general, the device entry icon view should still be clickable
for switch access users when it is visible.

Bug: 341916203
Flag: EXEMPT bugfix
Test: on a UDFPS device, swipe down on the home screen
in the UDFPS icon area. Notice that the notification
shade can expand from this location.

Change-Id: I151b989dde4f585f2c429c3436bb7307feb58234
parent e32053c0
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -74,8 +74,15 @@ object DeviceEntryIconViewBinder {
        val bgView = view.bgView
        longPressHandlingView.listener =
            object : LongPressHandlingView.Listener {
                override fun onLongPressDetected(view: View, x: Int, y: Int, isA11yAction: Boolean) {
                    if (!isA11yAction && falsingManager.isFalseLongTap(FalsingManager.LOW_PENALTY)) {
                override fun onLongPressDetected(
                    view: View,
                    x: Int,
                    y: Int,
                    isA11yAction: Boolean
                ) {
                    if (
                        !isA11yAction && falsingManager.isFalseLongTap(FalsingManager.LOW_PENALTY)
                    ) {
                        return
                    }
                    vibratorHelper.performHapticFeedback(
@@ -95,6 +102,7 @@ object DeviceEntryIconViewBinder {
                    launch("$TAG#viewModel.isVisible") {
                        viewModel.isVisible.collect { isVisible ->
                            longPressHandlingView.isInvisible = !isVisible
                            view.isClickable = isVisible
                        }
                    }
                    launch("$TAG#viewModel.isLongPressEnabled") {