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

Skip to content
Commit b1b4e954 authored by Kiran Ramachandra's avatar Kiran Ramachandra
Browse files

Enhanced TextClassifier APIs to support OTP detection use cases

1) Added SystemApi method getClassifier
2) Added TYPE enums that are requred to use the new method
3) A new TYPE_OTP enum has been added to support OTP detection use cases

Note: It would have been ideal to expose the existing method `getTextClassifier(int type)` as a SystemAPI, however this method is annotated as `UnsupportedAppUsage`. While it is acceptable to expose it as SystemApi, in our case we will need to Flag and Guard with a permission. go/UnsupportedAppUsage#can-i-add-an-annotated-method-to-the-public-sdk-systemapi

Bug: 377229653
Test: atest FrameworksCoreTests:TextClassificationManagerTest CtsTextClassifierTestCases:TextClassificationManagerTest CtsPermissionPolicyTestCases:PermissionPolicyTest
Flag: android.permission.flags.text_classifier_choice_api_enabled

Change-Id: I513e06729e6de244a925c4e169bbdcaedfafc8e0
parent b098d3a3
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