From 6e256ccab44f5e3a6b544adb87650e709ada561f Mon Sep 17 00:00:00 2001 From: Oluwarotimi Adesina Date: Wed, 27 Nov 2024 14:05:57 +0000 Subject: Respect enterprise policy in AppFunctions Flag: android.app.appfunctions.flags.enable_app_function_manager Test: atest CtsAppFunctionTestCases -c Bug: 380442826 Change-Id: I277df0eade4787f906d426cfa5572f441747ad39 --- .../android/extensions/appfunctions/AppFunctionException.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libs/appfunctions/java') diff --git a/libs/appfunctions/java/com/android/extensions/appfunctions/AppFunctionException.java b/libs/appfunctions/java/com/android/extensions/appfunctions/AppFunctionException.java index 2540236f2ce5..0c521690b165 100644 --- a/libs/appfunctions/java/com/android/extensions/appfunctions/AppFunctionException.java +++ b/libs/appfunctions/java/com/android/extensions/appfunctions/AppFunctionException.java @@ -70,6 +70,13 @@ public final class AppFunctionException extends Exception { */ public static final int ERROR_CANCELLED = 2001; + /** + * The operation was disallowed by enterprise policy. + * + *

This error is in the {@link #ERROR_CATEGORY_SYSTEM} category. + */ + public static final int ERROR_ENTERPRISE_POLICY_DISALLOWED = 2002; + /** * An unknown error occurred while processing the call in the AppFunctionService. * @@ -189,7 +196,8 @@ public final class AppFunctionException extends Exception { ERROR_SYSTEM_ERROR, ERROR_INVALID_ARGUMENT, ERROR_DISABLED, - ERROR_CANCELLED + ERROR_CANCELLED, + ERROR_ENTERPRISE_POLICY_DISALLOWED }) @Retention(RetentionPolicy.SOURCE) public @interface ErrorCode {} -- cgit v1.2.3-59-g8ed1b