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

Commit cebdb613 authored by Himanshu Gupta's avatar Himanshu Gupta Committed by Automerger Merge Worker
Browse files

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

parents 342c0af6 aeace823
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