Merge "Fixing read from mUsersRedirectedToOwnerForMedia sparse array." into udc-dev am: aeace823f7 am: 1bec369a32
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23214017 Change-Id: I8aa2f04fb1e66184b7ad492150270f46570903fe 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) {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user