Merge "AppFunction Sidecar is frozen. Revert API Change" into main
diff --git a/libs/appfunctions/api/current.txt b/libs/appfunctions/api/current.txt
index f8fb6b7..139ccfd 100644
--- a/libs/appfunctions/api/current.txt
+++ b/libs/appfunctions/api/current.txt
@@ -36,8 +36,7 @@
public abstract class AppFunctionService extends android.app.Service {
ctor public AppFunctionService();
method @NonNull public final android.os.IBinder onBind(@Nullable android.content.Intent);
- method @MainThread public void onExecuteFunction(@NonNull com.android.extensions.appfunctions.ExecuteAppFunctionRequest, @NonNull String, @NonNull android.content.pm.SigningInfo, @NonNull android.os.CancellationSignal, @NonNull android.os.OutcomeReceiver<com.android.extensions.appfunctions.ExecuteAppFunctionResponse,com.android.extensions.appfunctions.AppFunctionException>);
- method @Deprecated @MainThread public abstract void onExecuteFunction(@NonNull com.android.extensions.appfunctions.ExecuteAppFunctionRequest, @NonNull String, @NonNull android.os.CancellationSignal, @NonNull android.os.OutcomeReceiver<com.android.extensions.appfunctions.ExecuteAppFunctionResponse,com.android.extensions.appfunctions.AppFunctionException>);
+ method @MainThread public abstract void onExecuteFunction(@NonNull com.android.extensions.appfunctions.ExecuteAppFunctionRequest, @NonNull String, @NonNull android.os.CancellationSignal, @NonNull android.os.OutcomeReceiver<com.android.extensions.appfunctions.ExecuteAppFunctionResponse,com.android.extensions.appfunctions.AppFunctionException>);
field @NonNull public static final String BIND_APP_FUNCTION_SERVICE = "android.permission.BIND_APP_FUNCTION_SERVICE";
field @NonNull public static final String SERVICE_INTERFACE = "android.app.appfunctions.AppFunctionService";
}
diff --git a/libs/appfunctions/java/com/android/extensions/appfunctions/AppFunctionService.java b/libs/appfunctions/java/com/android/extensions/appfunctions/AppFunctionService.java
index a09451e..81d9d81 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.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 @@
SidecarConverter.getSidecarExecuteAppFunctionRequest(
platformRequest),
callingPackage,
- callingPackageSigningInfo,
cancellationSignal,
new OutcomeReceiver<>() {
@Override
@@ -129,52 +127,10 @@
*
* @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<ExecuteAppFunctionResponse, AppFunctionException> callback) {
- onExecuteFunction(request, callingPackage, cancellationSignal, callback);
- }
-
- /**
- * Called by the system to execute a specific app function.
- *
- * <p>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.
- *
- * <p>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.
- *
- * <p>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.
- *
- * <p>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.
- *
- * <p>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,