summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2012-10-01 17:30:59 -0700
committerRussell Brenner <russellbrenner@google.com>2012-10-02 10:56:24 -0700
commit84d04c20531c94a52d20098ee675ad55df9acf8f (patch)
treeccadbcda4cf33299c6aae801824ca849c8275079 /src
parent23a5fbbdf4c0b4bb815fff69a20598dcb3588080 (diff)
downloadpackages_apps_settings-84d04c20531c94a52d20098ee675ad55df9acf8f.zip
packages_apps_settings-84d04c20531c94a52d20098ee675ad55df9acf8f.tar.gz
packages_apps_settings-84d04c20531c94a52d20098ee675ad55df9acf8f.tar.bz2
Pass flag to indicate multiple users on device
When creating a new account, some informational text changes when more than one user exists on the device. Because GLS is built with the SDK and because there is no public API to indicate this state, a flag is added to the bundle passed to the AccountManager, which then funnels down to GLS. Bug: 7255673 Change-Id: Ida2aa5f70ab308958de510a95194463c2a089182
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/accounts/AddAccountSettings.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/settings/accounts/AddAccountSettings.java b/src/com/android/settings/accounts/AddAccountSettings.java
index c5f2a9b..dffb1ee 100644
--- a/src/com/android/settings/accounts/AddAccountSettings.java
+++ b/src/com/android/settings/accounts/AddAccountSettings.java
@@ -55,7 +55,7 @@ import java.io.IOException;
*/
public class AddAccountSettings extends Activity {
/**
- *
+ *
*/
private static final String KEY_ADD_CALLED = "AddAccountCalled";
@@ -71,6 +71,9 @@ public class AddAccountSettings extends Activity {
/* package */ static final String EXTRA_SELECTED_ACCOUNT = "selected_account";
+ // show additional info regarding the use of a device with multiple users
+ static final String EXTRA_HAS_MULTIPLE_USERS = "hasMultipleUsers";
+
private static final int CHOOSE_ACCOUNT_REQUEST = 1;
private static final int DLG_MULTIUSER_WARNING = 1;
@@ -193,6 +196,7 @@ public class AddAccountSettings extends Activity {
Bundle addAccountOptions = new Bundle();
mPendingIntent = PendingIntent.getBroadcast(this, 0, new Intent(), 0);
addAccountOptions.putParcelable(KEY_CALLER_IDENTITY, mPendingIntent);
+ addAccountOptions.putBoolean(EXTRA_HAS_MULTIPLE_USERS, Utils.hasMultipleUsers(this));
AccountManager.get(this).addAccount(
accountType,
null, /* authTokenType */