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

Commit ed44706b authored by Mike Digman's avatar Mike Digman
Browse files

Use shortcut long labels if available in Sharesheet

For disambiguation between targets, it's important to see
the most detailed label provided by apps. This change is aligned
with the logic being used to display conversation shortcuts.

Fixes: 157142833
Test: manual
Change-Id: I203afc794730cac5c92717035af0ea47d8e6496b
parent a543dfde
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2156,7 +2156,10 @@ public class ChooserActivity extends ResolverActivity implements

            Bundle extras = new Bundle();
            extras.putString(Intent.EXTRA_SHORTCUT_ID, shortcutInfo.getId());
            ChooserTarget chooserTarget = new ChooserTarget(shortcutInfo.getShortLabel(),

            ChooserTarget chooserTarget = new ChooserTarget(
                    shortcutInfo.getLongLabel() != null ? shortcutInfo.getLongLabel()
                            : shortcutInfo.getShortLabel(),
                    null, // Icon will be loaded later if this target is selected to be shown.
                    score, matchingShortcuts.get(i).getTargetComponent().clone(), extras);