Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84d04c20 authored by Russell Brenner's avatar Russell Brenner
Browse files

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
parent 23a5fbbd
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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 */