Exit restrictions fragment if user was deleted

When resuming the restricted user fragment, make sure that the user still
exists, as it may have been deleted by the restricted user.

Bug: 11010340

Change-Id: I3360dbc42586c5bb28013844f8c788e641ad8b6a
This commit is contained in:
Amith Yamasani
2013-10-01 17:09:32 -07:00
parent 2274bb53cf
commit 38e7610512
2 changed files with 23 additions and 4 deletions

View File

@@ -347,6 +347,9 @@ public class AppRestrictionsFragment extends SettingsPreferenceFragment implemen
protected Drawable getCircularUserIcon() {
Bitmap userIcon = mUserManager.getUserIcon(mUser.getIdentifier());
if (userIcon == null) {
return null;
}
CircleFramedDrawable circularIcon =
CircleFramedDrawable.getInstance(this.getActivity(), userIcon);
return circularIcon;