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

Commit bec782c9 authored by Adam Bookatz's avatar Adam Bookatz
Browse files

String for: Failed guest creation doesn't crash Settings

In the new multiuser settings, there's no logic to handle
what happens when a guest user creation fails, and so Settings
crashed with a NullPointerException.
In the fix, we catch this case to avoid crashing, and display
a toast to the user so that they understand the operation was
not successful.

In this cl we create the string for the toast.

Bug: 175042193
Test: manually failed to create user and observe toast and no crash
Change-Id: I5d5e0a26d52ea81db273c2b74e259ad6783b5c97
parent 249a37c5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1389,6 +1389,8 @@
    <string name="user_switch_to_user">Switch to <xliff:g id="user_name" example="John Doe">%s</xliff:g></string>
    <!-- Dialog message when creating a new user [CHAR LIMIT=40] -->
    <string name="creating_new_user_dialog_message">Creating new user…</string>
    <!-- Text shown to notify that the creation of new user has failed. [CHAR LIMIT=40] -->
    <string name="add_user_failed">Failed to create a new user</string>

    <!-- Title for the preference to enter the nickname of the user to display in the user switcher [CHAR LIMIT=25]-->
    <string name="user_nickname">Nickname</string>