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

Commit c61363e7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add detectLanguage and suggestConversationActions to TCS"

parents eaba8681 0be540b2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -335,8 +335,10 @@ java_defaults {
        "core/java/android/service/chooser/IChooserTargetResult.aidl",
        "core/java/android/service/resolver/IResolverRankerService.aidl",
        "core/java/android/service/resolver/IResolverRankerResult.aidl",
        "core/java/android/service/textclassifier/IConversationActionsCallback.aidl",
        "core/java/android/service/textclassifier/ITextClassificationCallback.aidl",
        "core/java/android/service/textclassifier/ITextClassifierService.aidl",
        "core/java/android/service/textclassifier/ITextLanguageCallback.aidl",
        "core/java/android/service/textclassifier/ITextLinksCallback.aidl",
        "core/java/android/service/textclassifier/ITextSelectionCallback.aidl",
        "core/java/android/view/accessibility/IAccessibilityInteractionConnection.aidl",
+2 −0
Original line number Diff line number Diff line
@@ -5191,8 +5191,10 @@ package android.service.textclassifier {
    method public abstract void onClassifyText(android.view.textclassifier.TextClassificationSessionId, android.view.textclassifier.TextClassification.Request, android.os.CancellationSignal, android.service.textclassifier.TextClassifierService.Callback<android.view.textclassifier.TextClassification>);
    method public void onCreateTextClassificationSession(android.view.textclassifier.TextClassificationContext, android.view.textclassifier.TextClassificationSessionId);
    method public void onDestroyTextClassificationSession(android.view.textclassifier.TextClassificationSessionId);
    method public void onDetectLanguage(android.view.textclassifier.TextClassificationSessionId, android.view.textclassifier.TextLanguage.Request, android.os.CancellationSignal, android.service.textclassifier.TextClassifierService.Callback<android.view.textclassifier.TextLanguage>);
    method public abstract void onGenerateLinks(android.view.textclassifier.TextClassificationSessionId, android.view.textclassifier.TextLinks.Request, android.os.CancellationSignal, android.service.textclassifier.TextClassifierService.Callback<android.view.textclassifier.TextLinks>);
    method public void onSelectionEvent(android.view.textclassifier.TextClassificationSessionId, android.view.textclassifier.SelectionEvent);
    method public void onSuggestConversationActions(android.view.textclassifier.TextClassificationSessionId, android.view.textclassifier.ConversationActions.Request, android.os.CancellationSignal, android.service.textclassifier.TextClassifierService.Callback<android.view.textclassifier.ConversationActions>);
    method public abstract void onSuggestSelection(android.view.textclassifier.TextClassificationSessionId, android.view.textclassifier.TextSelection.Request, android.os.CancellationSignal, android.service.textclassifier.TextClassifierService.Callback<android.view.textclassifier.TextSelection>);
    field public static final java.lang.String SERVICE_INTERFACE = "android.service.textclassifier.TextClassifierService";
  }
+28 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.service.textclassifier;

import android.view.textclassifier.ConversationActions;

/**
 * Callback for a ConversationActions request.
 * @hide
 */
oneway interface IConversationActionsCallback {
    void onSuccess(in ConversationActions conversationActions);
    void onFailure();
}
 No newline at end of file
+14 −0
Original line number Diff line number Diff line
@@ -16,14 +16,18 @@

package android.service.textclassifier;

import android.service.textclassifier.IConversationActionsCallback;
import android.service.textclassifier.ITextClassificationCallback;
import android.service.textclassifier.ITextLanguageCallback;
import android.service.textclassifier.ITextLinksCallback;
import android.service.textclassifier.ITextSelectionCallback;
import android.view.textclassifier.ConversationActions;
import android.view.textclassifier.SelectionEvent;
import android.view.textclassifier.TextClassification;
import android.view.textclassifier.TextClassificationContext;
import android.view.textclassifier.TextClassificationSessionId;
import android.view.textclassifier.TextLinks;
import android.view.textclassifier.TextLanguage;
import android.view.textclassifier.TextSelection;

/**
@@ -58,4 +62,14 @@ oneway interface ITextClassifierService {

    void onDestroyTextClassificationSession(
            in TextClassificationSessionId sessionId);

    void onDetectLanguage(
            in TextClassificationSessionId sessionId,
            in TextLanguage.Request request,
            in ITextLanguageCallback callback);

    void onSuggestConversationActions(
            in TextClassificationSessionId sessionId,
            in ConversationActions.Request request,
            in IConversationActionsCallback callback);
}
+28 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.service.textclassifier;

import android.view.textclassifier.TextLanguage;

/**
 * Callback for a TextLanguage request.
 * @hide
 */
oneway interface ITextLanguageCallback {
    void onSuccess(in TextLanguage textLanguage);
    void onFailure();
}
 No newline at end of file
Loading