Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 279a38e1 authored by Joanne Chung's avatar Joanne Chung Committed by Android (Google) Code Review
Browse files

Merge "Remove translation service feature." into sc-dev

parents 60e65b4b 57dc3874
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -12733,7 +12733,6 @@ package android.content.pm {
    field public static final String FEATURE_TOUCHSCREEN_MULTITOUCH = "android.hardware.touchscreen.multitouch";
    field public static final String FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT = "android.hardware.touchscreen.multitouch.distinct";
    field public static final String FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND = "android.hardware.touchscreen.multitouch.jazzhand";
    field public static final String FEATURE_TRANSLATION = "android.software.translation";
    field public static final String FEATURE_USB_ACCESSORY = "android.hardware.usb.accessory";
    field public static final String FEATURE_USB_HOST = "android.hardware.usb.host";
    field public static final String FEATURE_VERIFIED_BOOT = "android.software.verified_boot";
+0 −8
Original line number Diff line number Diff line
@@ -3495,14 +3495,6 @@ public abstract class PackageManager {
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_AUTOFILL = "android.software.autofill";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}:
     * The device supports translation of text-to-text in multiple languages via integration with
     * the system {@link android.service.translation.TranslationService translation provider}.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_TRANSLATION = "android.software.translation";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}:
     * The device implements headtracking suitable for a VR device.
+0 −3
Original line number Diff line number Diff line
@@ -18,12 +18,10 @@ package android.view.translation;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresFeature;
import android.annotation.SystemService;
import android.annotation.WorkerThread;
import android.app.PendingIntent;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Handler;
import android.os.Looper;
import android.os.RemoteException;
@@ -53,7 +51,6 @@ import java.util.concurrent.atomic.AtomicInteger;
 * the server {@link android.service.translation.TranslationService} </p>
 */
@SystemService(Context.TRANSLATION_MANAGER_SERVICE)
@RequiresFeature(PackageManager.FEATURE_TRANSLATION)
public final class TranslationManager {

    private static final String TAG = "TranslationManager";
+3 −1
Original line number Diff line number Diff line
@@ -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