summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/SystemServer.java
diff options
context:
space:
mode:
authorJoanne Chung <joannechung@google.com>2021-04-07 19:38:34 +0800
committerJoanne Chung <joannechung@google.com>2021-04-12 16:03:44 +0800
commit57dc3874f6bb1638d7a0c9b25759ea468fcd2b25 (patch)
tree555df816627f3db9a566d935a59f5ca58c9da530 /services/java/com/android/server/SystemServer.java
parentaabfff1f73209fc458fade31458cc1cd77d7bb06 (diff)
Remove translation service feature.
Currently, the Translation uses feature to determine if we need to start the translation system service. But our case is like the content capture not the autofill, the autofill can have the feature without any service defined and the user can install one later. But translation isn't, we should need to check config instead of feature. The feature will not be used anymore, it's safe to delete it. If we leave the removal to next OS, it is painful to delete it. Bug: 183360041 Test: atest CtsTranslationTestCases Change-Id: Ib6886a17965937abf064e526c36c67428af7398f
Diffstat (limited to 'services/java/com/android/server/SystemServer.java')
-rw-r--r--services/java/com/android/server/SystemServer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 47e72ba0e6fc..912b8cad952c 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -2508,10 +2508,12 @@ public final class SystemServer implements Dumpable {
}
// Translation manager service
- if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_TRANSLATION)) {
+ if (deviceHasConfigString(context, R.string.config_defaultTranslationService)) {
t.traceBegin("StartTranslationManagerService");
mSystemServiceManager.startService(TRANSLATION_MANAGER_SERVICE_CLASS);
t.traceEnd();
+ } else {
+ Slog.d(TAG, "TranslationService not defined by OEM");
}
// NOTE: ClipboardService depends on ContentCapture and Autofill