From cf7552af3fff622c4ed693de6dadc21164692f43 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Fri, 10 Apr 2020 13:28:53 -0700 Subject: [PATCH] Add tooltip when long pressing system shortcut icon If we only show the icon view (rather than icon + label), show the label on long press. Bug: 148707493 Change-Id: I14ab45b43203375b573e5e5d937ad5ebfb016d83 --- src/com/android/launcher3/popup/PopupContainerWithArrow.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java index 36c8ee2337..331298f414 100644 --- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java +++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java @@ -51,6 +51,7 @@ import com.android.launcher3.DropTarget; import com.android.launcher3.DropTarget.DragObject; import com.android.launcher3.Launcher; import com.android.launcher3.R; +import com.android.launcher3.Utilities; import com.android.launcher3.accessibility.LauncherAccessibilityDelegate; import com.android.launcher3.accessibility.ShortcutMenuAccessibilityDelegate; import com.android.launcher3.dot.DotInfo; @@ -397,6 +398,9 @@ public class PopupContainerWithArrow extends Arr } else if (view instanceof ImageView) { // Only the system shortcut icon shows on a gray background header. info.setIconAndContentDescriptionFor((ImageView) view); + if (Utilities.ATLEAST_OREO) { + view.setTooltipText(view.getContentDescription()); + } } view.setTag(info); view.setOnClickListener(info);