/**@class android.content.RestrictionEntry implements android.os.Parcelable @extends java.lang.Object Applications can expose restrictions for a restricted user on a multiuser device. The administrator can configure these restrictions that will then be applied to the restricted user. Each RestrictionsEntry is one configurable restriction. <p/> Any application that chooses to expose such restrictions does so by implementing a receiver that handles the {@link android.content.Intent#ACTION_GET_RESTRICTION_ENTRIES} action. The receiver then returns a result bundle that contains an entry called "restrictions", whose value is an ArrayList<RestrictionsEntry>. */ var RestrictionEntry = { /** Hidden restriction type. Use this type for information that needs to be transferred across but shouldn't be presented to the user in the UI. Stores a single String value. */ TYPE_NULL : "0", /** Restriction of type "bool". Use this for storing a boolean value, typically presented as a checkbox in the UI. */ TYPE_BOOLEAN : "1", /** Restriction of type "choice". Use this for storing a string value, typically presented as a single-select list. Call {@link #setChoiceEntries(String[])} and {@link #setChoiceValues(String[])} to set the localized list entries to present to the user and the corresponding values, respectively. */ TYPE_CHOICE : "2", /** Internal restriction type. Use this for storing a string value, typically presented as a single-select list. Call {@link #setChoiceEntries(String[])} and {@link #setChoiceValues(String[])} to set the localized list entries to present to the user and the corresponding values, respectively. The presentation could imply that values in lower array indices are included when a particular value is chosen. @hide */ TYPE_CHOICE_LEVEL : "3", /** Restriction of type "multi-select". Use this for presenting a multi-select list where more than one entry can be selected, such as for choosing specific titles to white-list. Call {@link #setChoiceEntries(String[])} and {@link #setChoiceValues(String[])} to set the localized list entries to present to the user and the corresponding values, respectively. Use {@link #getAllSelectedStrings}() and {@link #setAllSelectedStrings(String[])} to manipulate the selections. */ TYPE_MULTI_SELECT : "4", /** Restriction of type "integer". Use this for storing an integer value. The range of values is from {@link Integer#MIN_VALUE} to {@link Integer#MAX_VALUE}. */ TYPE_INTEGER : "5", /** Restriction of type "string". Use this for storing a string value. @see #setSelectedString @see #getSelectedString */ TYPE_STRING : "6", /** Restriction of type "bundle". Use this for storing {@link android.os.Bundle bundles} of restrictions */ TYPE_BUNDLE : "7", /** Restriction of type "bundle_array". Use this for storing arrays of {@link android.os.Bundle bundles} of restrictions */ TYPE_BUNDLE_ARRAY : "8", /***/ CREATOR : "null", /**Creates an entry of type {@link #TYPE_BUNDLE}. @param {String} key the unique key for this restriction @param {Object {android.content.RestrictionEntry[]}} restrictionEntries array of nested restriction entries. @return {Object {android.content.RestrictionEntry}} the newly created restriction */ createBundleEntry : function( ) {}, /**Creates an entry of type {@link #TYPE_BUNDLE_ARRAY}. @param {String} key the unique key for this restriction @param {Object {android.content.RestrictionEntry[]}} restrictionEntries array of nested restriction entries. The array may only contain elements of type {@link #TYPE_BUNDLE bundle}. @return {Object {android.content.RestrictionEntry}} the newly created restriction */ createBundleArrayEntry : function( ) {}, /**Sets the type for this restriction. @param {Number} type the type for this restriction. */ setType : function( ) {}, /**Returns the type for this restriction. @return {Number} the type for this restriction */ getType : function( ) {}, /**Returns the currently selected string value. @return {String} the currently selected value, which can be null for types that aren't for holding single string values. */ getSelectedString : function( ) {}, /**Returns the list of currently selected values. @return {String} the list of current selections, if type is {@link #TYPE_MULTI_SELECT}, null otherwise. */ getAllSelectedStrings : function( ) {}, /**Returns the current selected state for an entry of type {@link #TYPE_BOOLEAN}. @return {Boolean} the current selected state of the entry. */ getSelectedState : function( ) {}, /**Returns the value of the entry as an integer when the type is {@link #TYPE_INTEGER}. @return {Number} the integer value of the entry. */ getIntValue : function( ) {}, /**Sets the integer value of the entry when the type is {@link #TYPE_INTEGER}. @param {Number} value the integer value to set. */ setIntValue : function( ) {}, /**Sets the string value to use as the selected value for this restriction. This value will be persisted by the system for later use by the application. @param {String} selectedString the string value to select. */ setSelectedString : function( ) {}, /**Sets the current selected state for an entry of type {@link #TYPE_BOOLEAN}. This value will be persisted by the system for later use by the application. @param {Boolean} state the current selected state */ setSelectedState : function( ) {}, /**Sets the current list of selected values for an entry of type {@link #TYPE_MULTI_SELECT}. These values will be persisted by the system for later use by the application. @param {Object {java.lang.String[]}} allSelectedStrings the current list of selected values. */ setAllSelectedStrings : function( ) {}, /**Sets a list of string values that can be selected by the user. If no user-visible entries are set by a call to {@link #setChoiceEntries(String[])}, these values will be the ones shown to the user. Values will be chosen from this list as the user's selection and the selected values can be retrieved by a call to {@link #getAllSelectedStrings}(), or {@link #getSelectedString}(), depending on whether it is a multi-select type or choice type. This method is not relevant for types other than {@link #TYPE_CHOICE}, and {@link #TYPE_MULTI_SELECT}. @param {Object {java.lang.String[]}} choiceValues an array of Strings which will be the selected values for the user's selections. @see #getChoiceValues() @see #getAllSelectedStrings() */ setChoiceValues : function( ) {}, /**Sets a list of string values that can be selected by the user, similar to {@link #setChoiceValues(String[])}. @param {Object {Context}} context the application context for retrieving the resources. @param {Number} stringArrayResId the resource id for a string array containing the possible values. @see #setChoiceValues(String[]) */ setChoiceValues : function( ) {}, /**Returns array of possible restriction entries that this entry may contain. */ getRestrictions : function( ) {}, /**Sets an array of possible restriction entries, that this entry may contain. <p>This method is only relevant for types {@link #TYPE_BUNDLE} and {@link #TYPE_BUNDLE_ARRAY} */ setRestrictions : function( ) {}, /**Returns the list of possible string values set earlier. @return {String} the list of possible values. */ getChoiceValues : function( ) {}, /**Sets a list of strings that will be presented as choices to the user. When the user selects one or more of these choices, the corresponding value from the possible values are stored as the selected strings. The size of this array must match the size of the array set in {@link #setChoiceValues(String[])}. This method is not relevant for types other than {@link #TYPE_CHOICE}, and {@link #TYPE_MULTI_SELECT}. @param {Object {java.lang.String[]}} choiceEntries the list of user-visible choices. @see #setChoiceValues(String[]) */ setChoiceEntries : function( ) {}, /**Sets a list of strings that will be presented as choices to the user. This is similar to {@link #setChoiceEntries(String[])}. @param {Object {Context}} context the application context, used for retrieving the resources. @param {Number} stringArrayResId the resource id of a string array containing the possible entries. */ setChoiceEntries : function( ) {}, /**Returns the list of strings, set earlier, that will be presented as choices to the user. @return {String} the list of choices presented to the user. */ getChoiceEntries : function( ) {}, /**Returns the provided user-visible description of the entry, if any. @return {String} the user-visible description, null if none was set earlier. */ getDescription : function( ) {}, /**Sets the user-visible description of the entry, as a possible sub-text for the title. You can use this to describe the entry in more detail or to display the current state of the restriction. @param {String} description the user-visible description string. */ setDescription : function( ) {}, /**This is the unique key for the restriction entry. @return {String} the key for the restriction. */ getKey : function( ) {}, /**Returns the user-visible title for the entry, if any. @return {String} the user-visible title for the entry, null if none was set earlier. */ getTitle : function( ) {}, /**Sets the user-visible title for the entry. @param {String} title the user-visible title for the entry. */ setTitle : function( ) {}, /** */ equals : function( ) {}, /** */ hashCode : function( ) {}, /** */ describeContents : function( ) {}, /** */ writeToParcel : function( ) {}, /** */ toString : function( ) {}, };