summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorErik <roboerik@android.com>2010-02-18 13:27:19 -0800
committerErik <roboerik@android.com>2010-02-24 11:05:14 -0800
commiteebc8e2e8fa23b2957fec5838acc874af9a64a3d (patch)
treecdea216dabdb2d4b81a12c7eb53916080508a1c3 /core/java/android
parentb9e5cc3c3a6f1d6421a7c4b2c0aa63beebfd1ebc (diff)
downloadframeworks_base-eebc8e2e8fa23b2957fec5838acc874af9a64a3d.zip
frameworks_base-eebc8e2e8fa23b2957fec5838acc874af9a64a3d.tar.gz
frameworks_base-eebc8e2e8fa23b2957fec5838acc874af9a64a3d.tar.bz2
b/2441327 Added add account intent to public api.
Added ACTION_ADD_ACCOUNT intent and EXTRAS_AUTHORITIES strings to the public api so that Calendar can send users to the add account screen directly instead of via the sync settings page.
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/provider/Settings.java40
1 files changed, 38 insertions, 2 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 14e27eb..a020da4 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -374,6 +374,11 @@ public final class Settings {
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
+ * The account types available to add via the add account button may be restricted by adding an
+ * {@link #EXTRA_AUTHORITIES} extra to this Intent with one or more syncable content provider's
+ * authorities. Only account types which can sync with that content provider will be offered to
+ * the user.
+ * <p>
* Input: Nothing.
* <p>
* Output: Nothing.
@@ -383,6 +388,24 @@ public final class Settings {
"android.settings.SYNC_SETTINGS";
/**
+ * Activity Action: Show add account screen for creating a new account.
+ * <p>
+ * In some cases, a matching Activity may not exist, so ensure you
+ * safeguard against this.
+ * <p>
+ * The account types available to add may be restricted by adding an {@link #EXTRA_AUTHORITIES}
+ * extra to the Intent with one or more syncable content provider's authorities. Only account
+ * types which can sync with that content provider will be offered to the user.
+ * <p>
+ * Input: Nothing.
+ * <p>
+ * Output: Nothing.
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_ADD_ACCOUNT =
+ "android.settings.ADD_ACCOUNT_SETTINGS";
+
+ /**
* Activity Action: Show settings for selecting the network operator.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
@@ -468,6 +491,19 @@ public final class Settings {
// End of Intent actions for Settings
+ /**
+ * Activity Extra: Limit available options in launched activity based on the given authority.
+ * <p>
+ * This can be passed as an extra field in an Activity Intent with one or more syncable content
+ * provider's authorities as a String[]. This field is used by some intents to alter the
+ * behavior of the called activity.
+ * <p>
+ * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types available based
+ * on the authority given.
+ */
+ public static final String EXTRA_AUTHORITIES =
+ "authorities";
+
private static final String JID_RESOURCE_PREFIX = "android";
public static final String AUTHORITY = "settings";
@@ -3033,11 +3069,11 @@ public final class Settings {
* @hide
*/
public static final String ANR_SHOW_BACKGROUND = "anr_show_background";
-
+
/**
* The {@link ComponentName} string of the service to be used as the voice recognition
* service.
- *
+ *
* @hide
*/
public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service";