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

Commit e530c108 authored by Vladislav Kaznacheev's avatar Vladislav Kaznacheev
Browse files

Allow hover tooltips for disabled views.

Still no long click tooltips on a disabled view, as it would be
not a very intuitive UX, and also very hard to implement.

Bug: 70258417
Test: android.view.cts.TooltipTest
Change-Id: I2c8ae91d4bc7e455ae6b27298290f1baaac80ee6
parent d8171027
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -26853,7 +26853,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        if (mAttachInfo == null || mTooltipInfo == null) {
            return false;
        }
        if ((mViewFlags & ENABLED_MASK) != ENABLED) {
        if (fromLongClick && (mViewFlags & ENABLED_MASK) != ENABLED) {
            return false;
        }
        if (TextUtils.isEmpty(mTooltipInfo.mTooltipText)) {
@@ -26900,7 +26900,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        }
        switch(event.getAction()) {
            case MotionEvent.ACTION_HOVER_MOVE:
                if ((mViewFlags & TOOLTIP) != TOOLTIP || (mViewFlags & ENABLED_MASK) != ENABLED) {
                if ((mViewFlags & TOOLTIP) != TOOLTIP) {
                    break;
                }
                if (!mTooltipInfo.mTooltipFromLongClick) {