Merge "Fixing read from mUsersRedirectedToOwnerForMedia sparse array." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
aeace823f7
@@ -892,8 +892,9 @@ public abstract class ContentProvider implements ContentInterface, ComponentCall
|
|||||||
*/
|
*/
|
||||||
private boolean isContentRedirectionAllowedForUser(int incomingUserId) {
|
private boolean isContentRedirectionAllowedForUser(int incomingUserId) {
|
||||||
if (MediaStore.AUTHORITY.equals(mAuthority)) {
|
if (MediaStore.AUTHORITY.equals(mAuthority)) {
|
||||||
if (mUsersRedirectedToOwnerForMedia.indexOfKey(incomingUserId) >= 0) {
|
int incomingUserIdIndex = mUsersRedirectedToOwnerForMedia.indexOfKey(incomingUserId);
|
||||||
return mUsersRedirectedToOwnerForMedia.valueAt(incomingUserId);
|
if (incomingUserIdIndex >= 0) {
|
||||||
|
return mUsersRedirectedToOwnerForMedia.valueAt(incomingUserIdIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Haven't seen this user yet, look it up
|
// Haven't seen this user yet, look it up
|
||||||
|
|||||||
Reference in New Issue
Block a user