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
Loading
Please register or sign in to comment