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

Commit aeace823 authored by Himanshu Gupta's avatar Himanshu Gupta Committed by Android (Google) Code Review
Browse files

Merge "Fixing read from mUsersRedirectedToOwnerForMedia sparse array." into udc-dev

parents ce96f697 ea5a59c3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -892,8 +892,9 @@ public abstract class ContentProvider implements ContentInterface, ComponentCall
     */
    private boolean isContentRedirectionAllowedForUser(int incomingUserId) {
        if (MediaStore.AUTHORITY.equals(mAuthority)) {
            if (mUsersRedirectedToOwnerForMedia.indexOfKey(incomingUserId) >= 0) {
                return mUsersRedirectedToOwnerForMedia.valueAt(incomingUserId);
            int incomingUserIdIndex = mUsersRedirectedToOwnerForMedia.indexOfKey(incomingUserId);
            if (incomingUserIdIndex >= 0) {
                return mUsersRedirectedToOwnerForMedia.valueAt(incomingUserIdIndex);
            }

            // Haven't seen this user yet, look it up