summaryrefslogtreecommitdiff
path: root/libs/appfunctions/java
diff options
context:
space:
mode:
Diffstat (limited to 'libs/appfunctions/java')
-rw-r--r--libs/appfunctions/java/com/google/android/appfunctions/sidecar/AppFunctionManager.java27
-rw-r--r--libs/appfunctions/java/com/google/android/appfunctions/sidecar/AppFunctionService.java71
2 files changed, 2 insertions, 96 deletions
diff --git a/libs/appfunctions/java/com/google/android/appfunctions/sidecar/AppFunctionManager.java b/libs/appfunctions/java/com/google/android/appfunctions/sidecar/AppFunctionManager.java
index d660926575d1..43377d8eb91c 100644
--- a/libs/appfunctions/java/com/google/android/appfunctions/sidecar/AppFunctionManager.java
+++ b/libs/appfunctions/java/com/google/android/appfunctions/sidecar/AppFunctionManager.java
@@ -126,33 +126,6 @@ public final class AppFunctionManager {
}
/**
- * Executes the app function.
- *
- * <p>Proxies request and response to the underlying {@link
- * android.app.appfunctions.AppFunctionManager#executeAppFunction}, converting the request and
- * response in the appropriate type required by the function.
- *
- * @deprecated Use {@link #executeAppFunction(ExecuteAppFunctionRequest, Executor,
- * CancellationSignal, Consumer)} instead. This method will be removed once usage references
- * are updated.
- */
- @Deprecated
- public void executeAppFunction(
- @NonNull ExecuteAppFunctionRequest sidecarRequest,
- @NonNull @CallbackExecutor Executor executor,
- @NonNull Consumer<ExecuteAppFunctionResponse> callback) {
- Objects.requireNonNull(sidecarRequest);
- Objects.requireNonNull(executor);
- Objects.requireNonNull(callback);
-
- executeAppFunction(
- sidecarRequest,
- executor,
- new CancellationSignal(),
- callback);
- }
-
- /**
* Returns a boolean through a callback, indicating whether the app function is enabled.
*
* <p>* This method can only check app functions owned by the caller, or those where the caller
diff --git a/libs/appfunctions/java/com/google/android/appfunctions/sidecar/AppFunctionService.java b/libs/appfunctions/java/com/google/android/appfunctions/sidecar/AppFunctionService.java
index 2a168e871713..0dc87e45b7e3 100644
--- a/libs/appfunctions/java/com/google/android/appfunctions/sidecar/AppFunctionService.java
+++ b/libs/appfunctions/java/com/google/android/appfunctions/sidecar/AppFunctionService.java
@@ -119,76 +119,9 @@ public abstract class AppFunctionService extends Service {
* @param callback A callback to report back the result.
*/
@MainThread
- public void onExecuteFunction(
+ public abstract void onExecuteFunction(
@NonNull ExecuteAppFunctionRequest request,
@NonNull String callingPackage,
@NonNull CancellationSignal cancellationSignal,
- @NonNull Consumer<ExecuteAppFunctionResponse> callback) {
- onExecuteFunction(request, cancellationSignal, callback);
- }
-
- /**
- * Called by the system to execute a specific app function.
- *
- * <p>This method is triggered when the system requests your AppFunctionService to handle a
- * particular function you have registered and made available.
- *
- * <p>To ensure proper routing of function requests, assign a unique identifier to each
- * function. 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 should come from the ID automatically generated by the AppFunctions
- * SDK. You can determine the specific function to invoke by calling {@link
- * ExecuteAppFunctionRequest#getFunctionIdentifier()}.
- *
- * <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.
- *
- * @param request The function execution request.
- * @param cancellationSignal A {@link CancellationSignal} to cancel the request.
- * @param callback A callback to report back the result.
- * @deprecated Use {@link #onExecuteFunction(ExecuteAppFunctionRequest, String,
- * CancellationSignal, Consumer)} instead. This method will be removed once usage references
- * are updated.
- */
- @MainThread
- @Deprecated
- public void onExecuteFunction(
- @NonNull ExecuteAppFunctionRequest request,
- @NonNull CancellationSignal cancellationSignal,
- @NonNull Consumer<ExecuteAppFunctionResponse> callback) {
- onExecuteFunction(request, callback);
- }
-
- /**
- * Called by the system to execute a specific app function.
- *
- * <p>This method is triggered when the system requests your AppFunctionService to handle a
- * particular function you have registered and made available.
- *
- * <p>To ensure proper routing of function requests, assign a unique identifier to each
- * function. 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 should come from the ID automatically generated by the AppFunctions
- * SDK. You can determine the specific function to invoke by calling {@link
- * ExecuteAppFunctionRequest#getFunctionIdentifier()}.
- *
- * <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.
- *
- * @param request The function execution request.
- * @param callback A callback to report back the result.
- * @deprecated Use {@link #onExecuteFunction(ExecuteAppFunctionRequest, CancellationSignal,
- * Consumer)} instead. This method will be removed once usage references are updated.
- */
- @MainThread
- @Deprecated
- public void onExecuteFunction(
- @NonNull ExecuteAppFunctionRequest request,
- @NonNull Consumer<ExecuteAppFunctionResponse> callback) {
- Log.w(
- "AppFunctionService",
- "Calling deprecated default implementation of onExecuteFunction");
- }
+ @NonNull Consumer<ExecuteAppFunctionResponse> callback);
}