Loading core/api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -8905,7 +8905,7 @@ package android.app.appfunctions { @FlaggedApi("android.app.appfunctions.flags.enable_app_function_manager") 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 abstract void onExecuteFunction(@NonNull android.app.appfunctions.ExecuteAppFunctionRequest, @NonNull String, @NonNull android.os.CancellationSignal, @NonNull android.os.OutcomeReceiver<android.app.appfunctions.ExecuteAppFunctionResponse,android.app.appfunctions.AppFunctionException>); method @MainThread public abstract void onExecuteFunction(@NonNull android.app.appfunctions.ExecuteAppFunctionRequest, @NonNull String, @NonNull android.content.pm.SigningInfo, @NonNull android.os.CancellationSignal, @NonNull android.os.OutcomeReceiver<android.app.appfunctions.ExecuteAppFunctionResponse,android.app.appfunctions.AppFunctionException>); field @NonNull public static final String SERVICE_INTERFACE = "android.app.appfunctions.AppFunctionService"; } core/java/android/app/appfunctions/AppFunctionService.java +19 −13 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.annotation.SdkConstant; import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.pm.SigningInfo; import android.os.Binder; import android.os.CancellationSignal; import android.os.IBinder; Loading Loading @@ -78,10 +79,10 @@ public abstract class AppFunctionService extends Service { void perform( @NonNull ExecuteAppFunctionRequest request, @NonNull String callingPackage, @NonNull SigningInfo callingPackageSigningInfo, @NonNull CancellationSignal cancellationSignal, @NonNull OutcomeReceiver<ExecuteAppFunctionResponse, AppFunctionException> callback); OutcomeReceiver<ExecuteAppFunctionResponse, AppFunctionException> callback); } /** @hide */ Loading @@ -93,6 +94,7 @@ public abstract class AppFunctionService extends Service { public void executeAppFunction( @NonNull ExecuteAppFunctionRequest request, @NonNull String callingPackage, @NonNull SigningInfo callingPackageSigningInfo, @NonNull ICancellationCallback cancellationCallback, @NonNull IExecuteAppFunctionCallback callback) { if (context.checkCallingPermission(BIND_APP_FUNCTION_SERVICE) Loading @@ -105,6 +107,7 @@ public abstract class AppFunctionService extends Service { onExecuteFunction.perform( request, callingPackage, callingPackageSigningInfo, buildCancellationSignal(cancellationCallback), new OutcomeReceiver<>() { @Override Loading Loading @@ -154,15 +157,17 @@ public abstract class AppFunctionService extends Service { /** * 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>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>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>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 Loading @@ -173,6 +178,8 @@ 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. */ Loading @@ -180,10 +187,9 @@ public abstract class AppFunctionService extends Service { public abstract void onExecuteFunction( @NonNull ExecuteAppFunctionRequest request, @NonNull String callingPackage, @NonNull SigningInfo callingPackageSigningInfo, @NonNull CancellationSignal cancellationSignal, @NonNull OutcomeReceiver<ExecuteAppFunctionResponse, AppFunctionException> callback); @NonNull OutcomeReceiver<ExecuteAppFunctionResponse, AppFunctionException> callback); /** * Returns result codes from throwable. Loading core/java/android/app/appfunctions/IAppFunctionService.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -35,12 +35,15 @@ oneway interface IAppFunctionService { * * @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 cancellationCallback a callback to send back the cancellation transport. * @param callback a callback to report back the result. */ void executeAppFunction( in ExecuteAppFunctionRequest request, in String callingPackage, in android.content.pm.SigningInfo callingPackageSigningInfo, in ICancellationCallback cancellationCallback, in IExecuteAppFunctionCallback callback ); Loading core/java/android/content/pm/SigningInfo.aidl 0 → 100644 +19 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 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.content.pm; parcelable SigningInfo; No newline at end of file libs/appfunctions/api/current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,8 @@ package com.android.extensions.appfunctions { 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 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 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>); 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"; } Loading Loading
core/api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -8905,7 +8905,7 @@ package android.app.appfunctions { @FlaggedApi("android.app.appfunctions.flags.enable_app_function_manager") 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 abstract void onExecuteFunction(@NonNull android.app.appfunctions.ExecuteAppFunctionRequest, @NonNull String, @NonNull android.os.CancellationSignal, @NonNull android.os.OutcomeReceiver<android.app.appfunctions.ExecuteAppFunctionResponse,android.app.appfunctions.AppFunctionException>); method @MainThread public abstract void onExecuteFunction(@NonNull android.app.appfunctions.ExecuteAppFunctionRequest, @NonNull String, @NonNull android.content.pm.SigningInfo, @NonNull android.os.CancellationSignal, @NonNull android.os.OutcomeReceiver<android.app.appfunctions.ExecuteAppFunctionResponse,android.app.appfunctions.AppFunctionException>); field @NonNull public static final String SERVICE_INTERFACE = "android.app.appfunctions.AppFunctionService"; }
core/java/android/app/appfunctions/AppFunctionService.java +19 −13 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.annotation.SdkConstant; import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.pm.SigningInfo; import android.os.Binder; import android.os.CancellationSignal; import android.os.IBinder; Loading Loading @@ -78,10 +79,10 @@ public abstract class AppFunctionService extends Service { void perform( @NonNull ExecuteAppFunctionRequest request, @NonNull String callingPackage, @NonNull SigningInfo callingPackageSigningInfo, @NonNull CancellationSignal cancellationSignal, @NonNull OutcomeReceiver<ExecuteAppFunctionResponse, AppFunctionException> callback); OutcomeReceiver<ExecuteAppFunctionResponse, AppFunctionException> callback); } /** @hide */ Loading @@ -93,6 +94,7 @@ public abstract class AppFunctionService extends Service { public void executeAppFunction( @NonNull ExecuteAppFunctionRequest request, @NonNull String callingPackage, @NonNull SigningInfo callingPackageSigningInfo, @NonNull ICancellationCallback cancellationCallback, @NonNull IExecuteAppFunctionCallback callback) { if (context.checkCallingPermission(BIND_APP_FUNCTION_SERVICE) Loading @@ -105,6 +107,7 @@ public abstract class AppFunctionService extends Service { onExecuteFunction.perform( request, callingPackage, callingPackageSigningInfo, buildCancellationSignal(cancellationCallback), new OutcomeReceiver<>() { @Override Loading Loading @@ -154,15 +157,17 @@ public abstract class AppFunctionService extends Service { /** * 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>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>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>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 Loading @@ -173,6 +178,8 @@ 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. */ Loading @@ -180,10 +187,9 @@ public abstract class AppFunctionService extends Service { public abstract void onExecuteFunction( @NonNull ExecuteAppFunctionRequest request, @NonNull String callingPackage, @NonNull SigningInfo callingPackageSigningInfo, @NonNull CancellationSignal cancellationSignal, @NonNull OutcomeReceiver<ExecuteAppFunctionResponse, AppFunctionException> callback); @NonNull OutcomeReceiver<ExecuteAppFunctionResponse, AppFunctionException> callback); /** * Returns result codes from throwable. Loading
core/java/android/app/appfunctions/IAppFunctionService.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -35,12 +35,15 @@ oneway interface IAppFunctionService { * * @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 cancellationCallback a callback to send back the cancellation transport. * @param callback a callback to report back the result. */ void executeAppFunction( in ExecuteAppFunctionRequest request, in String callingPackage, in android.content.pm.SigningInfo callingPackageSigningInfo, in ICancellationCallback cancellationCallback, in IExecuteAppFunctionCallback callback ); Loading
core/java/android/content/pm/SigningInfo.aidl 0 → 100644 +19 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 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.content.pm; parcelable SigningInfo; No newline at end of file
libs/appfunctions/api/current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,8 @@ package com.android.extensions.appfunctions { 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 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 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>); 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"; } Loading