Freigeben über


DevicePolicyManager.SetMeteredDataDisabledPackages Method

Definition

Called by a device or profile owner to restrict packages from using metered data.

[Android.Runtime.Register("setMeteredDataDisabledPackages", "(Landroid/content/ComponentName;Ljava/util/List;)Ljava/util/List;", "GetSetMeteredDataDisabledPackages_Landroid_content_ComponentName_Ljava_util_List_Handler", ApiSince=28)]
public virtual System.Collections.Generic.IList<string> SetMeteredDataDisabledPackages (Android.Content.ComponentName admin, System.Collections.Generic.IList<string> packageNames);
[<Android.Runtime.Register("setMeteredDataDisabledPackages", "(Landroid/content/ComponentName;Ljava/util/List;)Ljava/util/List;", "GetSetMeteredDataDisabledPackages_Landroid_content_ComponentName_Ljava_util_List_Handler", ApiSince=28)>]
abstract member SetMeteredDataDisabledPackages : Android.Content.ComponentName * System.Collections.Generic.IList<string> -> System.Collections.Generic.IList<string>
override this.SetMeteredDataDisabledPackages : Android.Content.ComponentName * System.Collections.Generic.IList<string> -> System.Collections.Generic.IList<string>

Parameters

admin
ComponentName

which DeviceAdminReceiver this request is associated with.

packageNames
IList<String>

the list of package names to be restricted.

Returns

a list of package names which could not be restricted.

Attributes

Remarks

Called by a device or profile owner to restrict packages from using metered data.

Java documentation for android.app.admin.DevicePolicyManager.setMeteredDataDisabledPackages(android.content.ComponentName, java.util.List<java.lang.String>).

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