Improve RestrictionEntry API
More getters and setters, better naming.
New extra defined for returning a custom intent that handles showing the
restrictions UI.
Change-Id: I2ee0cdb4edd99e71a9004ff5e929dbe243b45557
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index e1461e3..0efd6b0 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -2416,8 +2416,11 @@
/**
* Broadcast to a specific application to query any supported restrictions to impose
- * on restricted users. The response should contain an extra {@link #EXTRA_RESTRICTIONS}
- * which is of type <code>ArrayList<RestrictionEntry></code>.
+ * on restricted users. The response should contain an extra {@link #EXTRA_RESTRICTIONS},
+ * which is of type <code>ArrayList<RestrictionEntry></code>. It can also
+ * contain an extra {@link #EXTRA_RESTRICTIONS_INTENT}, which is of type <code>Intent</code>.
+ * The activity specified by that intent will be launched for a result which must contain
+ * the extra {@link #EXTRA_RESTRICTIONS}. The returned restrictions will be persisted.
* @see RestrictionEntry
*/
public static final String ACTION_GET_RESTRICTION_ENTRIES =
@@ -3161,6 +3164,13 @@
*/
public static final String EXTRA_RESTRICTIONS = "android.intent.extra.restrictions";
+ /**
+ * Extra used in the response from a BroadcastReceiver that handles
+ * {@link #ACTION_GET_RESTRICTION_ENTRIES}.
+ */
+ public static final String EXTRA_RESTRICTIONS_INTENT =
+ "android.intent.extra.restrictions_intent";
+
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Intent flags (see mFlags variable).