We need to hold the DataManager.LOCK when calling reload.
Change-Id: If908c233bcd835effffc7750a7ef07f56a63136c
fix:
6315479
for (BucketEntry entry : entries) {
MediaSet album = getLocalAlbum(dataManager,
mType, mPath, entry.bucketId, entry.bucketName);
- album.reload();
albums.add(album);
}
return albums;
if (mLoadBuffer != null) {
mAlbums = mLoadBuffer;
mLoadBuffer = null;
+ for (MediaSet album : mAlbums) {
+ album.reload();
+ }
mDataVersion = nextVersionNumber();
}
return mDataVersion;
}
}
Collections.sort(result, MediaSetUtils.NAME_COMPARATOR);
-
- for (int i = 0, n = result.size(); i < n; ++i) {
- result.get(i).reload();
- }
return result;
}
}
if (mLoadBuffer != null) {
mDeviceSet = mLoadBuffer;
mLoadBuffer = null;
+ for (MediaSet device : mDeviceSet) {
+ device.reload();
+ }
mDataVersion = nextVersionNumber();
}
return mDataVersion;