From bbc5bed0f6738e363df188a24080bc69c322cff8 Mon Sep 17 00:00:00 2001 From: Oluwarotimi Adesina Date: Wed, 8 Jan 2025 11:54:36 +0000 Subject: AppFunction Sidecar is frozen. Revert API Change BUG: 354951810 BUG: 388454933 Flag: android.app.appfunctions.flags.enable_app_function_manager Test: atest AppFunctionManagerTest Change-Id: Ice6ecb6959047561b23d8f89c9ceb4e8c72d9110 --- .../appfunctions/AppFunctionService.java | 44 ---------------------- 1 file changed, 44 deletions(-) (limited to 'libs/appfunctions/java') diff --git a/libs/appfunctions/java/com/android/extensions/appfunctions/AppFunctionService.java b/libs/appfunctions/java/com/android/extensions/appfunctions/AppFunctionService.java index a09451ede4fc..81d9d81c4f58 100644 --- a/libs/appfunctions/java/com/android/extensions/appfunctions/AppFunctionService.java +++ b/libs/appfunctions/java/com/android/extensions/appfunctions/AppFunctionService.java @@ -25,7 +25,6 @@ import android.annotation.Nullable; import android.annotation.SdkConstant; import android.app.Service; import android.content.Intent; -import android.content.pm.SigningInfo; import android.os.Binder; import android.os.CancellationSignal; import android.os.IBinder; @@ -82,7 +81,6 @@ public abstract class AppFunctionService extends Service { SidecarConverter.getSidecarExecuteAppFunctionRequest( platformRequest), callingPackage, - callingPackageSigningInfo, cancellationSignal, new OutcomeReceiver<>() { @Override @@ -129,52 +127,10 @@ public abstract class AppFunctionService extends Service { * * @param request The function execution request. * @param callingPackage The package name of the app that is requesting the execution. - * @param callingPackageSigningInfo The signing information of the app that is requesting the - * execution. * @param cancellationSignal A signal to cancel the execution. * @param callback A callback to report back the result or error. */ @MainThread - public void onExecuteFunction( - @NonNull ExecuteAppFunctionRequest request, - @NonNull String callingPackage, - @NonNull SigningInfo callingPackageSigningInfo, - @NonNull CancellationSignal cancellationSignal, - @NonNull OutcomeReceiver callback) { - onExecuteFunction(request, callingPackage, cancellationSignal, callback); - } - - /** - * Called by the system to execute a specific app function. - * - *

This method is the entry point for handling all app function requests in an app. When the - * system needs your AppFunctionService to perform a function, it will invoke this method. - * - *

Each function you've registered is identified by a unique identifier. This identifier - * doesn't need to be globally unique, but it must be unique within your app. For example, a - * function to order food could be identified as "orderFood". In most cases, this identifier is - * automatically generated by the AppFunctions SDK. - * - *

You can determine which function to execute by calling {@link - * ExecuteAppFunctionRequest#getFunctionIdentifier()}. This allows your service to route the - * incoming request to the appropriate logic for handling the specific function. - * - *

This method is always triggered in the main thread. You should run heavy tasks on a worker - * thread and dispatch the result with the given callback. You should always report back the - * result using the callback, no matter if the execution was successful or not. - * - *

This method also accepts a {@link CancellationSignal} that the app should listen to cancel - * the execution of function if requested by the system. - * - * @param request The function execution request. - * @param callingPackage The package name of the app that is requesting the execution. - * @param cancellationSignal A signal to cancel the execution. - * @param callback A callback to report back the result or error. - * @deprecated Use {@link #onExecuteFunction(ExecuteAppFunctionRequest, String, SigningInfo, - * CancellationSignal, OutcomeReceiver)} instead. - */ - @MainThread - @Deprecated public abstract void onExecuteFunction( @NonNull ExecuteAppFunctionRequest request, @NonNull String callingPackage, -- cgit v1.2.3-59-g8ed1b