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

Commit 8d224da7 authored by Ronish Kalia's avatar Ronish Kalia Committed by Android (Google) Code Review
Browse files

Merge "Add support for launching user edit dialog"

parents 90c02742 ca7f6bf9
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -172,6 +172,9 @@ public class UserSettings extends SettingsPreferenceFragment
    private static final String KEY_TITLE = "title";
    private static final String KEY_SUMMARY = "summary";

    private static final String EXTRA_OPEN_DIALOG_USER_PROFILE_EDITOR =
            "EXTRA_OPEN_DIALOG_USER_PROFILE_EDITOR";

    static {
        USER_REMOVED_INTENT_FILTER = new IntentFilter(Intent.ACTION_USER_REMOVED);
        USER_REMOVED_INTENT_FILTER.addAction(Intent.ACTION_USER_INFO_CHANGED);
@@ -283,6 +286,12 @@ public class UserSettings extends SettingsPreferenceFragment
        mSwitchBarController = new MultiUserSwitchBarController(activity,
                new MainSwitchBarController(switchBar), this /* listener */);
        getSettingsLifecycle().addObserver(mSwitchBarController);

        boolean openUserEditDialog = getIntent().getBooleanExtra(
                EXTRA_OPEN_DIALOG_USER_PROFILE_EDITOR, false);
        if (switchBar.isChecked() && openUserEditDialog) {
            showDialog(DIALOG_USER_PROFILE_EDITOR);
        }
    }

    @Override