summaryrefslogtreecommitdiff
path: root/libs/appfunctions/java
diff options
context:
space:
mode:
author Oluwarotimi Adesina <oadesina@google.com> 2024-11-27 14:05:57 +0000
committer Desh <oadesina@google.com> 2024-12-04 17:35:00 +0000
commit6e256ccab44f5e3a6b544adb87650e709ada561f (patch)
tree91f5dc78adae3163597b355e3fd1871ffe568200 /libs/appfunctions/java
parent7a4b6865f49ce4297d4d5c24a3bac3f29716afde (diff)
Respect enterprise policy in AppFunctions
Flag: android.app.appfunctions.flags.enable_app_function_manager Test: atest CtsAppFunctionTestCases -c Bug: 380442826 Change-Id: I277df0eade4787f906d426cfa5572f441747ad39
Diffstat (limited to 'libs/appfunctions/java')
-rw-r--r--libs/appfunctions/java/com/android/extensions/appfunctions/AppFunctionException.java10
1 files changed, 9 insertions, 1 deletions
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
@@ -71,6 +71,13 @@ public final class AppFunctionException extends Exception {
public static final int ERROR_CANCELLED = 2001;
/**
+ * The operation was disallowed by enterprise policy.
+ *
+ * <p>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.
*
* <p>This error is thrown when the service is connected in the remote application but an
@@ -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 {}