diff options
author | 2024-11-25 21:12:11 +0000 | |
---|---|---|
committer | 2024-12-06 01:31:34 +0000 | |
commit | b1b4e9540d8440479a07d3da668afa2e7d660b10 (patch) | |
tree | 4466ebd15ab915fc266ecf21e727f5bbecfddedd /api/api.go | |
parent | b098d3a359841ef66d1543b0fee12a163ac1f922 (diff) |
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
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions