Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1954918 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Improve AppFunction policy documentation" into main

parents 98ac97eb c24765d5
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -4354,20 +4354,24 @@ public class DevicePolicyManager {
    }
    /**
     * Indicates that app functions are not controlled by policy.
     * Indicates that {@link android.app.appfunctions.AppFunctionManager} is not controlled by
     * policy.
     *
     * <p>If no admin set this policy, it means appfunctions are enabled.
     */
    @FlaggedApi(android.app.appfunctions.flags.Flags.FLAG_ENABLE_APP_FUNCTION_MANAGER)
    public static final int APP_FUNCTIONS_NOT_CONTROLLED_BY_POLICY = 0;
    /** Indicates that app functions are controlled and disabled by a policy. */
    /** Indicates that {@link android.app.appfunctions.AppFunctionManager} is controlled and
     * disabled by policy, i.e. no apps in the current user are allowed to expose app functions.
     */
    @FlaggedApi(android.app.appfunctions.flags.Flags.FLAG_ENABLE_APP_FUNCTION_MANAGER)
    public static final int APP_FUNCTIONS_DISABLED = 1;
    /**
     * Indicates that app functions are controlled and disabled by a policy for cross profile
     * interactions only.
     * Indicates that {@link android.app.appfunctions.AppFunctionManager} is controlled and
     * disabled by a policy for cross profile interactions only, i.e. app functions exposed by apps
     * in the current user can only be invoked within the same user.
     *
     * <p>This is different from {@link #APP_FUNCTIONS_DISABLED} in that it only disables cross
     * profile interactions (even if the caller has permissions required to interact across users).
@@ -4388,7 +4392,9 @@ public class DevicePolicyManager {
    public @interface AppFunctionsPolicy {}
    /**
     * Sets the app functions policy which controls app functions operations on the device.
     * Sets the {@link android.app.appfunctions.AppFunctionManager} policy which controls app
     * functions operations on the device. An app function is a piece of functionality that apps
     * expose to the system for cross-app orchestration.
     *
     * <p>This function can only be called by a device owner, a profile owner or holders of the
     * permission {@link android.Manifest.permission#MANAGE_DEVICE_POLICY_APP_FUNCTIONS}.
@@ -4414,7 +4420,7 @@ public class DevicePolicyManager {
    }
    /**
     * Returns the current app functions policy.
     * Returns the current {@link android.app.appfunctions.AppFunctionManager} policy.
     *
     * <p>The returned policy will be the current resolved policy rather than the policy set by the
     * calling admin.