Allow to use ExtService as TextClassifierService
1. Define a trust TextClassifierService list which contains ExtService. And also define a DeviceConfig flag which can be set to the TextClassifierService we would like to use. Because the TextClassfierService can be set to a side-load app, e.g. CTS tests. If the override flag is not one of the packages in the trust TextClassifierService list, it should be able to see only text from its own UID. 2. Made TextClassifierService available for testing. 3. Fix the incoreect order for onConnected(). 4. Fix API Lint errors. Bug: 141111813 Bug: 143249163 Test: atest FrameworksCoreTests:android.view.textclassifier Test: Manual. dumpsys to check current TextClassifierService. Change flag to another service, and then check TextClassifierService changing to expected TextClassifierService. Test: Manual. Use local TextClassifierService to make sure the service call order of connection callback and API call is correct. Change-Id: I37ff298f0c65ae0469bd54e30f1ebf48b77c126c
Loading
Please register or sign in to comment