Share via


RestrictionsManager.ApplicationRestrictionsPerAdmin Property

Definition

Returns a List containing a Bundle for each managing agent that has set restrictions for the current application, the bundle contains any application restrictions set for the current package.

public virtual System.Collections.Generic.IList<Android.OS.Bundle> ApplicationRestrictionsPerAdmin { [Android.Runtime.Register("getApplicationRestrictionsPerAdmin", "()Ljava/util/List;", "GetGetApplicationRestrictionsPerAdminHandler", ApiSince=34)] get; }
[<get: Android.Runtime.Register("getApplicationRestrictionsPerAdmin", "()Ljava/util/List;", "GetGetApplicationRestrictionsPerAdminHandler", ApiSince=34)>]
member this.ApplicationRestrictionsPerAdmin : System.Collections.Generic.IList<Android.OS.Bundle>

Property Value

a List of Bundle containing the restrictions set by admins for that package. Returns an empty List if there are no saved restrictions.

Attributes

Remarks

Returns a List containing a Bundle for each managing agent that has set restrictions for the current application, the bundle contains any application restrictions set for the current package. The order of the items in the list is not guaranteed to remain stable between multiple calls.

Starting from Android version android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE, it is possible for there to be multiple managing apps on the device with the ability to set restrictions, e.g. an Enterprise Device Policy Controller (DPC) and a Supervision admin.

Each Bundle consists of key-value pairs, as defined by the application, where the types of values may be: <ul> <li>boolean<li>int<li>String or String[]<li>From android.os.Build.VERSION_CODES#M, Bundle or Bundle[]</ul>

NOTE: The method performs disk I/O and shouldn't be called on the main thread

Java documentation for android.content.RestrictionsManager.getApplicationRestrictionsPerAdmin().

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