Udostępnij za pośrednictwem


DevicePolicyManager.UsbDataSignalingEnabled Property

Definition

Returns whether USB data signaling is currently enabled. -or- Called by a device owner or profile owner of an organization-owned managed profile to enable or disable USB data signaling for the device.

public virtual bool UsbDataSignalingEnabled { [Android.Runtime.Register("isUsbDataSignalingEnabled", "()Z", "GetIsUsbDataSignalingEnabledHandler", ApiSince=31)] get; [Android.Runtime.Register("setUsbDataSignalingEnabled", "(Z)V", "GetSetUsbDataSignalingEnabled_ZHandler", ApiSince=31)] [Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_USB_DATA_SIGNALLING")] set; }
[<get: Android.Runtime.Register("isUsbDataSignalingEnabled", "()Z", "GetIsUsbDataSignalingEnabledHandler", ApiSince=31)>]
[<set: Android.Runtime.Register("setUsbDataSignalingEnabled", "(Z)V", "GetSetUsbDataSignalingEnabled_ZHandler", ApiSince=31)>]
[<set: Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_USB_DATA_SIGNALLING")>]
member this.UsbDataSignalingEnabled : bool with get, set

Property Value

true if USB data signaling is enabled, false otherwise.

Attributes

Remarks

Property getter documentation:

Returns whether USB data signaling is currently enabled.

When called by a device owner or profile owner of an organization-owned managed profile, this API returns whether USB data signaling is currently enabled by that admin. When called by any other app, returns whether USB data signaling is currently enabled on the device.

Java documentation for android.app.admin.DevicePolicyManager.isUsbDataSignalingEnabled().

Property setter documentation:

Called by a device owner or profile owner of an organization-owned managed profile to enable or disable USB data signaling for the device. When disabled, USB data connections (except from charging functions) are prohibited.

This API is not supported on all devices, the caller should call #canUsbDataSignalingBeDisabled() to check whether enabling or disabling USB data signaling is supported on the device.

Java documentation for android.app.admin.DevicePolicyManager.setUsbDataSignalingEnabled(boolean).

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.

Applies to