Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 239e8a89 authored by Oleksandr Peletskyi's avatar Oleksandr Peletskyi Committed by Android (Google) Code Review
Browse files

Merge "Added check of the restriction if a user is allowed to change their icon. BUG: 25305966"

parents f9d33044 ef158431
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.UserManager;
import android.provider.ContactsContract.DisplayPhoto;
import android.provider.MediaStore;
import android.support.v4.content.FileProvider;
@@ -95,6 +96,10 @@ public class EditUserPhotoController {
                showUpdatePhotoPopup();
            }
        });
        final UserManager um = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
        if (um.hasUserRestriction(UserManager.DISALLOW_SET_USER_ICON)) {
            mImageView.setEnabled(false);
        }
        mNewUserPhotoBitmap = bitmap;
        mNewUserPhotoDrawable = drawable;
    }