diff options
3 files changed, 3 insertions, 22 deletions
diff --git a/src/com/android/settings/users/AppRestrictionsFragment.java b/src/com/android/settings/users/AppRestrictionsFragment.java index 6d4bed1d8..faaa3330b 100644 --- a/src/com/android/settings/users/AppRestrictionsFragment.java +++ b/src/com/android/settings/users/AppRestrictionsFragment.java @@ -317,16 +317,6 @@ public class AppRestrictionsFragment extends SettingsPreferenceFragment implemen return getPreferenceScreen(); } - Drawable getCircularUserIcon() { - Bitmap userIcon = mUserManager.getUserIcon(mUser.getIdentifier()); - if (userIcon == null) { - return null; - } - CircleFramedDrawable circularIcon = - CircleFramedDrawable.getInstance(this.getActivity(), userIcon); - return circularIcon; - } - protected void clearSelectedApps() { mSelectedPackages.clear(); } diff --git a/src/com/android/settings/users/EditUserInfoController.java b/src/com/android/settings/users/EditUserInfoController.java index 0f844a791..ab771012d 100644 --- a/src/com/android/settings/users/EditUserInfoController.java +++ b/src/com/android/settings/users/EditUserInfoController.java @@ -37,6 +37,7 @@ import android.widget.EditText; import android.widget.ImageView; import com.android.settings.R; +import com.android.settings.Utils; import com.android.settings.drawable.CircleFramedDrawable; /** @@ -98,16 +99,6 @@ public class EditUserInfoController { } } - Drawable getCircularUserIcon(Activity activity) { - Bitmap userIcon = mUserManager.getUserIcon(mUser.getIdentifier()); - if (userIcon == null) { - return null; - } - CircleFramedDrawable circularIcon = - CircleFramedDrawable.getInstance(activity, userIcon); - return circularIcon; - } - public Dialog createDialog(final Fragment fragment, final Drawable currentUserIcon, final CharSequence currentUserName, int titleResId, final OnContentChangedCallback callback, UserHandle user) { @@ -131,7 +122,7 @@ public class EditUserInfoController { } else { drawable = currentUserIcon; if (drawable == null) { - drawable = getCircularUserIcon(activity); + drawable = Utils.getUserIcon(activity, mUserManager, info); } } userPhotoView.setImageDrawable(drawable); diff --git a/src/com/android/settings/users/RestrictedProfileSettings.java b/src/com/android/settings/users/RestrictedProfileSettings.java index 82090d454..03a55d43c 100644 --- a/src/com/android/settings/users/RestrictedProfileSettings.java +++ b/src/com/android/settings/users/RestrictedProfileSettings.java @@ -90,7 +90,7 @@ public class RestrictedProfileSettings extends AppRestrictionsFragment } else { ((TextView) mHeaderView.findViewById(android.R.id.title)).setText(info.name); ((ImageView) mHeaderView.findViewById(android.R.id.icon)).setImageDrawable( - getCircularUserIcon()); + Utils.getUserIcon(getActivity(), mUserManager, info)); } } |