Don't use the profile info for name

Since we now have a way to directly edit the user's photo/name
via a dialog, don't rely on the Me profile name anymore. That
one will be out of sync with the manual nickname editing.

Bug: 15761405
Change-Id: Ia16c43ddcfd47894b2d2e049802d7de153ea5b94
This commit is contained in:
Amith Yamasani
2014-07-25 09:37:33 -07:00
parent 8610ff9ea6
commit 2d578ce293
2 changed files with 2 additions and 18 deletions

View File

@@ -50,8 +50,6 @@ import android.os.UserManager;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceGroup;
import android.provider.ContactsContract;
import android.provider.ContactsContract.Contacts;
import android.provider.Settings.Secure;
import android.util.Log;
import android.util.SparseArray;
@@ -142,7 +140,6 @@ public class UserSettings extends SettingsPreferenceFragment
private int mRemovingUserId = -1;
private int mAddedUserId = 0;
private boolean mAddingUser;
private boolean mProfileExists;
private boolean mEnabled = true;
private boolean mCanAddRestrictedProfile = true;
@@ -310,7 +307,6 @@ public class UserSettings extends SettingsPreferenceFragment
* Loads profile information for the current user.
*/
private void loadProfile() {
mProfileExists = false;
if (mIsGuest) {
// No need to load profile information
mMePreference.setIcon(getEncircledGuestDrawable());
@@ -330,11 +326,7 @@ public class UserSettings extends SettingsPreferenceFragment
if (user.iconPath == null || user.iconPath.equals("")) {
assignProfilePhoto(user);
}
String profileName = getProfileName();
if (profileName == null) {
profileName = user.name;
}
return profileName;
return user.name;
}
}.execute();
}
@@ -843,14 +835,6 @@ public class UserSettings extends SettingsPreferenceFragment
}
}
private String getProfileName() {
String name = Utils.getMeProfileName(getActivity(), true);
if (name != null) {
mProfileExists = true;
}
return name;
}
private void assignDefaultPhoto(UserInfo user) {
Bitmap bitmap = createBitmapFromDrawable(
USER_DRAWABLES[user.id % UserSettings.USER_DRAWABLES.length]);