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

Commit b11568c0 authored by Joanne Chung's avatar Joanne Chung Committed by Automerger Merge Worker
Browse files

Merge "Fix broken tests in TextClassifierServiceTest." into rvc-dev am: 6d6ddf45 am: 06d9593c

Change-Id: Ibf26d3d2d015252772690f631e737de5fbe579d4
parents f4f07f80 06d9593c
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import java.util.Objects;
 */
public final class TextClassificationContext implements Parcelable {

    // NOTE: Modify packageName only in the constructor or in setSystemTextClassifierMetadata()
    private String mPackageName;
    private final String mWidgetType;
    @Nullable private final String mWidgetVersion;
@@ -47,7 +46,7 @@ public final class TextClassificationContext implements Parcelable {
    }

    /**
     * Returns the package name for the calling package.
     * Returns the package name of the app that this context originated in.
     */
    @NonNull
    public String getPackageName() {
@@ -57,14 +56,10 @@ public final class TextClassificationContext implements Parcelable {
    /**
     * Sets the information about the {@link SystemTextClassifier} that sent this request.
     *
     * <p><b>NOTE: </b>This will override the value returned in {@link getPackageName()}.
     * @hide
     */
    void setSystemTextClassifierMetadata(@Nullable SystemTextClassifierMetadata systemTcMetadata) {
        mSystemTcMetadata = systemTcMetadata;
        if (mSystemTcMetadata != null) {
            mPackageName = mSystemTcMetadata.getCallingPackageName();
        }
    }

    /**
+2 −2
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ public final class TextClassificationManagerService extends ITextClassifierServi

        handleRequest(
                event.getSystemTextClassifierMetadata(),
                /* verifyCallingPackage= */ false,
                /* verifyCallingPackage= */ true,
                /* attemptToBind= */ false,
                service -> service.onSelectionEvent(sessionId, event),
                "onSelectionEvent",
@@ -253,7 +253,7 @@ public final class TextClassificationManagerService extends ITextClassifierServi

        handleRequest(
                systemTcMetadata,
                /* verifyCallingPackage= */ false,
                /* verifyCallingPackage= */ true,
                /* attemptToBind= */ false,
                service -> service.onTextClassifierEvent(sessionId, event),
                "onTextClassifierEvent",