Loading src/com/android/settings/users/ProfileUpdateReceiver.java +0 −7 Original line number Diff line number Diff line Loading @@ -57,18 +57,11 @@ public class ProfileUpdateReceiver extends BroadcastReceiver { } static void copyProfileName(Context context) { SharedPreferences prefs = context.getSharedPreferences("profile", Context.MODE_PRIVATE); if (prefs.contains(KEY_PROFILE_NAME_COPIED_ONCE)) { return; } int userId = UserHandle.myUserId(); UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE); String profileName = Utils.getMeProfileName(context, false /* partial name */); if (profileName != null && profileName.length() > 0) { um.setUserName(userId, profileName); // Flag that we've written the profile one time at least. No need to do it in the future. prefs.edit().putBoolean(KEY_PROFILE_NAME_COPIED_ONCE, true).commit(); } } } src/com/android/settings/users/UserSettings.java +5 −1 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import android.os.UserManager; import android.preference.Preference; import android.preference.Preference.OnPreferenceClickListener; import android.preference.PreferenceGroup; import android.provider.ContactsContract; import android.provider.Settings; import android.provider.Settings.Secure; import android.util.Log; Loading Loading @@ -884,7 +885,10 @@ public class UserSettings extends SettingsPreferenceFragment if (mUserManager.isLinkedUser()) { onManageUserClicked(UserHandle.myUserId(), false); } else { showDialog(DIALOG_USER_PROFILE_EDITOR); Intent intent = ContactsContract.QuickContact.composeQuickContactsIntent( getActivity(), getView(), ContactsContract.Profile.CONTENT_URI, ContactsContract.QuickContact.MODE_LARGE, null); getActivity().startActivityAsUser(intent, new UserHandle(UserHandle.USER_CURRENT)); } } else if (pref instanceof UserPreference) { int userId = ((UserPreference) pref).getUserId(); Loading Loading
src/com/android/settings/users/ProfileUpdateReceiver.java +0 −7 Original line number Diff line number Diff line Loading @@ -57,18 +57,11 @@ public class ProfileUpdateReceiver extends BroadcastReceiver { } static void copyProfileName(Context context) { SharedPreferences prefs = context.getSharedPreferences("profile", Context.MODE_PRIVATE); if (prefs.contains(KEY_PROFILE_NAME_COPIED_ONCE)) { return; } int userId = UserHandle.myUserId(); UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE); String profileName = Utils.getMeProfileName(context, false /* partial name */); if (profileName != null && profileName.length() > 0) { um.setUserName(userId, profileName); // Flag that we've written the profile one time at least. No need to do it in the future. prefs.edit().putBoolean(KEY_PROFILE_NAME_COPIED_ONCE, true).commit(); } } }
src/com/android/settings/users/UserSettings.java +5 −1 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import android.os.UserManager; import android.preference.Preference; import android.preference.Preference.OnPreferenceClickListener; import android.preference.PreferenceGroup; import android.provider.ContactsContract; import android.provider.Settings; import android.provider.Settings.Secure; import android.util.Log; Loading Loading @@ -884,7 +885,10 @@ public class UserSettings extends SettingsPreferenceFragment if (mUserManager.isLinkedUser()) { onManageUserClicked(UserHandle.myUserId(), false); } else { showDialog(DIALOG_USER_PROFILE_EDITOR); Intent intent = ContactsContract.QuickContact.composeQuickContactsIntent( getActivity(), getView(), ContactsContract.Profile.CONTENT_URI, ContactsContract.QuickContact.MODE_LARGE, null); getActivity().startActivityAsUser(intent, new UserHandle(UserHandle.USER_CURRENT)); } } else if (pref instanceof UserPreference) { int userId = ((UserPreference) pref).getUserId(); Loading