DevicePolicyManager.SetScreenCaptureDisabled(ComponentName, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called by a device/profile owner to set whether the screen capture is disabled.
[Android.Runtime.Register("setScreenCaptureDisabled", "(Landroid/content/ComponentName;Z)V", "GetSetScreenCaptureDisabled_Landroid_content_ComponentName_ZHandler")]
[Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_SCREEN_CAPTURE")]
public virtual void SetScreenCaptureDisabled (Android.Content.ComponentName? admin, bool disabled);
[<Android.Runtime.Register("setScreenCaptureDisabled", "(Landroid/content/ComponentName;Z)V", "GetSetScreenCaptureDisabled_Landroid_content_ComponentName_ZHandler")>]
[<Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_SCREEN_CAPTURE")>]
abstract member SetScreenCaptureDisabled : Android.Content.ComponentName * bool -> unit
override this.SetScreenCaptureDisabled : Android.Content.ComponentName * bool -> unit
Parameters
- admin
- ComponentName
Which DeviceAdminReceiver
this request is associated with. Null if the
caller is not a device admin.
- disabled
- Boolean
Whether screen capture is disabled or not.
- Attributes
Remarks
Called by a device/profile owner to set whether the screen capture is disabled. Disabling screen capture also prevents the content from being shown on display devices that do not have a secure video output. See android.view.Display#FLAG_SECURE
for more details about secure surfaces and secure displays.
This method can be called on the DevicePolicyManager
instance, returned by #getParentProfileInstance(ComponentName)
, where the calling device admin must be the profile owner of an organization-owned managed profile. If it is not, a security exception will be thrown.
If the caller is device owner or called on the parent instance by a profile owner of an organization-owned managed profile, then the restriction will be applied to all users.
From version android.os.Build.VERSION_CODES#M
disabling screen capture also blocks assist requests for all activities of the relevant user.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.