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

Commit 8e7db7a7 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7718904 from 3a986bb9 to sc-qpr1-release

Change-Id: Ifa61e684d51d973245edcdaa7429bea490be01ba
parents fa9d95fc 3a986bb9
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
andrewlewis@google.com
aquilescanta@google.com
chz@google.com
# Bug component: 1344
hdmoon@google.com
hkuang@google.com
jinpark@google.com
klhyun@google.com
lnilsson@google.com
marcone@google.com
sungsoo@google.com

# go/android-fwk-media-solutions for info on areas of ownership.
include platform/frameworks/av:/media/janitors/media_solutions_OWNERS
+7 −2
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ static const char VERTEX_SHADER_SOURCE[] = R"(
    })";
static const char IMAGE_FRAG_DYNAMIC_COLORING_SHADER_SOURCE[] = R"(
    precision mediump float;
    const float cWhiteMaskThreshold = 0.05f;
    const float cWhiteMaskThreshold = 0.05;
    uniform sampler2D uTexture;
    uniform float uFade;
    uniform float uColorProgress;
@@ -155,7 +155,7 @@ static const char IMAGE_FRAG_DYNAMIC_COLORING_SHADER_SOURCE[] = R"(
                + g * mix(uStartColor1, uEndColor1, uColorProgress)
                + b * mix(uStartColor2, uEndColor2, uColorProgress)
                + a * mix(uStartColor3, uEndColor3, uColorProgress);
        color = mix(color, vec4(vec3((r + g + b + a) * 0.25f), 1.0), useWhiteMask);
        color = mix(color, vec4(vec3((r + g + b + a) * 0.25), 1.0), useWhiteMask);
        gl_FragColor = vec4(color.x, color.y, color.z, (1.0 - uFade)) * color.a;
    })";
static const char IMAGE_FRAG_SHADER_SOURCE[] = R"(
@@ -699,6 +699,11 @@ GLuint compileShader(GLenum shaderType, const GLchar *source) {
    glGetShaderiv(shader, GL_COMPILE_STATUS, &isCompiled);
    if (isCompiled == GL_FALSE) {
        SLOGE("Compile shader failed. Shader type: %d", shaderType);
        GLint maxLength = 0;
        glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &maxLength);
        std::vector<GLchar> errorLog(maxLength);
        glGetShaderInfoLog(shader, maxLength, &maxLength, &errorLog[0]);
        SLOGE("Shader compilation error: %s", &errorLog[0]);
        return 0;
    }
    return shader;
+0 −1
Original line number Diff line number Diff line
@@ -11848,7 +11848,6 @@ public final class Settings {
         * Whether UWB should be enabled.
         * @hide
         */
        @Readable
        public static final String UWB_ENABLED = "uwb_enabled";
        /**
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ import com.android.internal.os.IResultReceiver;
/**
 * System-wide on-device translation service.
 *
 * <p>Services requests to translate text between different languages. The primary use case for this
 * <p>Services requests to translate data between different languages. The primary use case for this
 * service is automatic translation of text and web views, when the auto Translate feature is
 * enabled.
 *
+25 −21
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ import android.view.translation.TranslationManager;
import android.view.translation.TranslationRequest;
import android.view.translation.TranslationResponse;
import android.view.translation.TranslationSpec;
import android.view.translation.Translator;

import com.android.internal.os.IResultReceiver;

@@ -81,7 +82,10 @@ public abstract class TranslationService extends Service {
     * android.R.styleable#TranslationService translation-service}&gt;</code> tag.
     *
     * <p>Here's an example of how to use it on {@code AndroidManifest.xml}:
     * TODO: fill in doc example (check CCService/AFService).
     * <pre> &lt;translation-service
     *     android:settingsActivity="foo.bar.SettingsActivity"
     *     . . .
     * /&gt;</pre>
     */
    public static final String SERVICE_META_DATA = "android.translation_service";

@@ -148,7 +152,6 @@ public abstract class TranslationService extends Service {
        void onTranslationSuccess(@NonNull TranslationResponse response);

        /**
         * TODO: implement javadoc
         * @removed use {@link #onTranslationSuccess} with an error response instead.
         */
        @Deprecated
@@ -225,7 +228,7 @@ public abstract class TranslationService extends Service {
     * should call back with {@code false}.</p>
     *
     * @param translationContext the {@link TranslationContext} of the session being created.
     * @param sessionId the int id of the session.
     * @param sessionId the id of the session.
     * @param callback {@link Consumer} to notify whether the session was successfully created.
     */
    // TODO(b/176464808): the session id won't be unique cross client/server process. Need to find
@@ -234,8 +237,6 @@ public abstract class TranslationService extends Service {
            int sessionId, @NonNull Consumer<Boolean> callback);

    /**
     * TODO: fill in javadoc.
     *
     * @removed use {@link #onCreateTranslationSession(TranslationContext, int, Consumer)}
     * instead.
     */
@@ -246,19 +247,16 @@ public abstract class TranslationService extends Service {
    }

    /**
     * TODO: fill in javadoc.
     * Called when a translation session is finished.
     *
     * <p>The translation session is finished when the client calls {@link Translator#destroy()} on
     * the corresponding translator.
     *
     * @param sessionId
     * @param sessionId id of the session that finished.
     */
    public abstract void onFinishTranslationSession(int sessionId);

    /**
     * TODO: fill in javadoc.
     *
     * @param request
     * @param sessionId
     * @param callback
     * @param cancellationSignal
     * @removed use
     * {@link #onTranslationRequest(TranslationRequest, int, CancellationSignal, Consumer)} instead.
     */
@@ -276,23 +274,29 @@ public abstract class TranslationService extends Service {
     * {@link TranslationRequest#FLAG_PARTIAL_RESPONSES} was set, the service may call
     * {@code callback.accept()} multiple times with partial responses.</p>
     *
     * @param request
     * @param sessionId
     * @param callback
     * @param cancellationSignal
     * @param request The translation request containing the data to be translated.
     * @param sessionId id of the session that sent the translation request.
     * @param cancellationSignal A {@link CancellationSignal} that notifies when a client has
     *                           cancelled the operation in progress.
     * @param callback {@link Consumer} to pass back the translation response.
     */
    public abstract void onTranslationRequest(@NonNull TranslationRequest request, int sessionId,
            @Nullable CancellationSignal cancellationSignal,
            @NonNull Consumer<TranslationResponse> callback);

    /**
     * TODO: fill in javadoc
     * Called to request a set of {@link TranslationCapability}s that are supported by the service.
     *
     * <p>The set of translation capabilities are limited to those supporting the source and target
     * {@link TranslationSpec.DataFormat}. e.g. Calling this with
     * {@link TranslationSpec#DATA_FORMAT_TEXT} as source and target returns only capabilities that
     * translates text to text.</p>
     *
     * <p>Must call {@code callback.accept} to pass back the set of translation capabilities.</p>
     *
     * @param sourceFormat
     * @param targetFormat
     * @param callback
     * @param sourceFormat data format restriction of the translation source spec.
     * @param targetFormat data format restriction of the translation target spec.
     * @param callback {@link Consumer} to pass back the set of translation capabilities.
     */
    public abstract void onTranslationCapabilitiesRequest(
            @TranslationSpec.DataFormat int sourceFormat,
Loading