Merge "Fixing read from mUsersRedirectedToOwnerForMedia sparse array." into udc-dev am: aeace823f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23214017 Change-Id: Ib22c9f7e452997d66fe84eecd6502e0dfca7ba0e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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