Share via


RestrictionsManager.ConvertRestrictionsToBundle Method

Definition

Converts a list of restrictions to the corresponding bundle, using the following mapping: <table> <tr><th>RestrictionEntry</th><th>Bundle</th></tr> <tr><td>RestrictionEntry#TYPE_BOOLEAN</td><td>Bundle#putBoolean</td></tr> <tr><td>RestrictionEntry#TYPE_CHOICE, RestrictionEntry#TYPE_MULTI_SELECT</td> <td>Bundle#putStringArray</td></tr> <tr><td>RestrictionEntry#TYPE_INTEGER</td><td>Bundle#putInt</td></tr> <tr><td>RestrictionEntry#TYPE_STRING</td><td>Bundle#putString</td></tr> <tr><td>RestrictionEntry#TYPE_BUNDLE</td><td>Bundle#putBundle</td></tr> <tr><td>RestrictionEntry#TYPE_BUNDLE_ARRAY</td> <td>Bundle#putParcelableArray</td></tr> </table>

[Android.Runtime.Register("convertRestrictionsToBundle", "(Ljava/util/List;)Landroid/os/Bundle;", "", ApiSince=23)]
public static Android.OS.Bundle? ConvertRestrictionsToBundle (System.Collections.Generic.IList<Android.Content.RestrictionEntry>? entries);
[<Android.Runtime.Register("convertRestrictionsToBundle", "(Ljava/util/List;)Landroid/os/Bundle;", "", ApiSince=23)>]
static member ConvertRestrictionsToBundle : System.Collections.Generic.IList<Android.Content.RestrictionEntry> -> Android.OS.Bundle

Parameters

entries
IList<RestrictionEntry>

list of restrictions

Returns

Attributes

Remarks

Converts a list of restrictions to the corresponding bundle, using the following mapping: <table> <tr><th>RestrictionEntry</th><th>Bundle</th></tr> <tr><td>RestrictionEntry#TYPE_BOOLEAN</td><td>Bundle#putBoolean</td></tr> <tr><td>RestrictionEntry#TYPE_CHOICE, RestrictionEntry#TYPE_MULTI_SELECT</td> <td>Bundle#putStringArray</td></tr> <tr><td>RestrictionEntry#TYPE_INTEGER</td><td>Bundle#putInt</td></tr> <tr><td>RestrictionEntry#TYPE_STRING</td><td>Bundle#putString</td></tr> <tr><td>RestrictionEntry#TYPE_BUNDLE</td><td>Bundle#putBundle</td></tr> <tr><td>RestrictionEntry#TYPE_BUNDLE_ARRAY</td> <td>Bundle#putParcelableArray</td></tr> </table>

Java documentation for android.content.RestrictionsManager.convertRestrictionsToBundle(java.util.List<android.content.RestrictionEntry>).

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