summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Miranda Kephart <mkephart@google.com> 2023-02-28 11:07:11 -0500
committer Miranda Kephart <mkephart@google.com> 2023-02-28 13:34:21 -0500
commit4ebe03cd0f7590ae333b60cee486d7ce8a1568e8 (patch)
treec43c78b42f6326ddbfb6ce46cc13147a13bc5d22 /libs/androidfw/StringPool.cpp
parent99dc404b91bc23945c30f1e9cb9df7360550a6e2 (diff)
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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions