summaryrefslogtreecommitdiff
path: root/packages/Shell
diff options
context:
space:
mode:
author Kiran Ramachandra <kiranmr@google.com> 2024-11-25 21:12:11 +0000
committer Kiran Ramachandra <kiranmr@google.com> 2024-12-06 01:31:34 +0000
commitb1b4e9540d8440479a07d3da668afa2e7d660b10 (patch)
tree4466ebd15ab915fc266ecf21e727f5bbecfddedd /packages/Shell
parentb098d3a359841ef66d1543b0fee12a163ac1f922 (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 'packages/Shell')
-rw-r--r--packages/Shell/AndroidManifest.xml4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml
index baf829ab3b14..3cb74eeafa96 100644
--- a/packages/Shell/AndroidManifest.xml
+++ b/packages/Shell/AndroidManifest.xml
@@ -992,6 +992,10 @@
<uses-permission android:name="android.permission.health.READ_SKIN_TEMPERATURE"
android:featureFlag="android.permission.flags.replace_body_sensor_permission_enabled"/>
+ <!-- Permission for TestClassifier tests to get access to classifier by type -->
+ <uses-permission android:name="android.permission.ACCESS_TEXT_CLASSIFIER_BY_TYPE"
+ android:featureFlag="android.permission.flags.text_classifier_choice_api_enabled"/>
+
<application
android:label="@string/app_label"
android:theme="@android:style/Theme.DeviceDefault.DayNight"