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

Skip to content
Commit 4ebe03cd authored by Miranda Kephart's avatar Miranda Kephart
Browse files

Consider entity length when deciding whether to show actions

Currently, we show the highest-confidence action, regardless of how
much space it takes up in the total copied text. This leads to some
strange behaviors like showing a calendar action if a date is shown
anywhere in the text.

This change adds a minimum proportion (currently 80%); if the text
link takes up less than that proportion of the total copied text,
it is ignored.

Bug: 270445121
Bug: 270421442
Fix: 270445121
Test: manual (using an article headline+date, as in the bug);
atest ClipboardOverlayUtilsTest

Change-Id: I99b9c48aae121244e01f8783d9eb8068d3c12fe3
parent 99dc404b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment