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

Commit 60c9f480 authored by Mehdi Alizadeh's avatar Mehdi Alizadeh Committed by Android (Google) Code Review
Browse files

Merge "Updates java doc in AppPredictionService" into qt-dev

parents 3ad357f6 8ed33831
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import android.os.Looper;
import android.os.RemoteException;
import android.service.appprediction.IPredictionService.Stub;
import android.util.ArrayMap;
import android.util.Log;
import android.util.Slog;

import java.util.ArrayList;
@@ -46,7 +47,7 @@ import java.util.List;
import java.util.function.Consumer;

/**
 * TODO(b/111701043): Add java docs
 * A service used to predict app and shortcut usage.
 *
 * @hide
 */
@@ -58,7 +59,9 @@ public abstract class AppPredictionService extends Service {

    /**
     * The {@link Intent} that must be declared as handled by the service.
     * TODO(b/111701043): Add any docs about permissions the service must hold
     *
     * <p>The service must also require the {@link android.permission#MANAGE_APP_PREDICTIONS}
     * permission.
     *
     * @hide
     */
@@ -145,9 +148,12 @@ public abstract class AppPredictionService extends Service {
    @Override
    @NonNull
    public final IBinder onBind(@NonNull Intent intent) {
        // TODO(b/111701043): Verify that the action is valid
        if (SERVICE_INTERFACE.equals(intent.getAction())) {
            return mInterface.asBinder();
        }
        Log.w(TAG, "Tried to bind to wrong intent (should be " + SERVICE_INTERFACE + ": " + intent);
        return null;
    }

    /**
     * Called by a client app to indicate a target launch
@@ -180,7 +186,6 @@ public abstract class AppPredictionService extends Service {

    /**
     * Called by the client app to request sorting of targets based on prediction rank.
     * TODO(b/111701043): Implement CancellationSignal so caller can cancel a long running request
     */
    @MainThread
    public abstract void onSortAppTargets(@NonNull AppPredictionSessionId sessionId,
@@ -254,7 +259,6 @@ public abstract class AppPredictionService extends Service {
    /**
     * Called by the client app to request target predictions. This method is only called if there
     * are one or more prediction callbacks registered.
     * TODO(b/111701043): Add java docs
     *
     * @see #updatePredictions(AppPredictionSessionId, List)
     */