Add text classification results to clip description and clip data.
With this change, text classification is performed on text in clip data when it is set as the primary clip, if it is below a certain length. This allows information about which entities (e.g. URLs, addresses) are present in the text to be added to the ClipDescription. With toast notifications being added when an app accesses clipboard, this change will allow apps to tell if clipboard contains information they are interested in before they access the clip data. This will allow unnecessary clipboard accesses to be avoided. If entities are detected in the clip data, the results of classification are added to the ClipData so that users of this API do not then need to repeat text classification themselves in order to locate the entities. Bug: 180577441 Test: new CTS tests added to ClipDescriptionTest Change-Id: I334db4805b8b72e0e00c721fe6efe64ec0661a8a
Loading
Please register or sign in to comment