From bec782c911c82b6937c2645fedc5229a96418e0a Mon Sep 17 00:00:00 2001 From: Adam Bookatz Date: Wed, 31 Mar 2021 18:26:19 -0700 Subject: 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 --- packages/SettingsLib/res/values/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml index 7186ec5be805..9e92457be26e 100644 --- a/packages/SettingsLib/res/values/strings.xml +++ b/packages/SettingsLib/res/values/strings.xml @@ -1389,6 +1389,8 @@ Switch to %s Creating new user… + + Failed to create a new user Nickname -- cgit v1.2.3-59-g8ed1b