Fix: change owner name when account setup
When the device is setup with an account the owner's user name should be updated. This was broken due to ag/14056085, so we fix it here. Test: manual (set up new device and make sure name is changed) Bug: 194510551 Change-Id: Ide5bc525eba17c78f457c2baa131d7cefd4c15dd
This commit is contained in:
@@ -63,6 +63,9 @@ public class ProfileUpdateReceiver extends BroadcastReceiver {
|
|||||||
|
|
||||||
/** Returns whether the current user name is different from the default one. */
|
/** Returns whether the current user name is different from the default one. */
|
||||||
private static boolean isCurrentNameInteresting(Context context, UserManager um) {
|
private static boolean isCurrentNameInteresting(Context context, UserManager um) {
|
||||||
|
if (!um.isUserNameSet()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
final String currentName = um.getUserName();
|
final String currentName = um.getUserName();
|
||||||
final String defaultName = um.isRestrictedProfile() || um.isProfile() ?
|
final String defaultName = um.isRestrictedProfile() || um.isProfile() ?
|
||||||
context.getString(com.android.settingslib.R.string.user_new_profile_name) :
|
context.getString(com.android.settingslib.R.string.user_new_profile_name) :
|
||||||
|
Reference in New Issue
Block a user