Merge "Pass flag to indicate multiple users on device" into jb-mr1-dev

This commit is contained in:
Russell Brenner
2012-10-02 17:17:59 -07:00
committed by Android (Google) Code Review

View File

@@ -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 */