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

Commit 701a4920 authored by Alex Johnston's avatar Alex Johnston Committed by Automerger Merge Worker
Browse files

Merge "Update setCameraDisabled javadoc" into rvc-dev am: bde41fca am: 3bfec9f0 am: 2ae1cfc8

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11818602

Change-Id: I23bd536f913b53756f9de9932b7bd648da136140
parents 0bf65803 2ae1cfc8
Loading
Loading
Loading
Loading
+12 −2
Original line number Original line Diff line number Diff line
@@ -5868,12 +5868,22 @@ public class DevicePolicyManager {
     * returned by {@link #getParentProfileInstance(ComponentName)}, where the caller must be
     * returned by {@link #getParentProfileInstance(ComponentName)}, where the caller must be
     * the profile owner of an organization-owned managed profile.
     * the profile owner of an organization-owned managed profile.
     * <p>
     * <p>
     * If the caller is device owner or called on the parent instance, then the
     * If the caller is device owner, then the restriction will be applied to all users. If
     * restriction will be applied to all users.
     * called on the parent instance, then the restriction will be applied on the personal profile.
     * <p>
     * <p>
     * The calling device admin must have requested
     * The calling device admin must have requested
     * {@link DeviceAdminInfo#USES_POLICY_DISABLE_CAMERA} to be able to call this method; if it has
     * {@link DeviceAdminInfo#USES_POLICY_DISABLE_CAMERA} to be able to call this method; if it has
     * not, a security exception will be thrown.
     * not, a security exception will be thrown.
     * <p>
     * <b>Note</b>, this policy type is deprecated for legacy device admins since
     * {@link android.os.Build.VERSION_CODES#Q}. On Android
     * {@link android.os.Build.VERSION_CODES#Q} devices, legacy device admins targeting SDK
     * version {@link android.os.Build.VERSION_CODES#P} or below can still call this API to
     * disable camera, while legacy device admins targeting SDK version
     * {@link android.os.Build.VERSION_CODES#Q} will receive a SecurityException. Starting
     * from Android {@link android.os.Build.VERSION_CODES#R}, requests to disable camera from
     * legacy device admins targeting SDK version {@link android.os.Build.VERSION_CODES#P} or
     * below will be silently ignored.
     *
     *
     * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
     * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
     * @param disabled Whether or not the camera should be disabled.
     * @param disabled Whether or not the camera should be disabled.