Merge "Fix crash issue on Storage Manager app"

am: cb4a3c55cf

Change-Id: If33e23972770c50cf83a42d8621d31b15b945524
This commit is contained in:
Su, Weihua
2017-03-20 17:12:40 +00:00
committed by android-build-merger

View File

@@ -649,7 +649,11 @@ public class ApplicationsState {
}
if (comparator != null) {
Collections.sort(filteredApps, comparator);
synchronized (mEntriesMap) {
// Locking to ensure that the background handler does not mutate
// the size of AppEntries used for ordering while sorting.
Collections.sort(filteredApps, comparator);
}
}
synchronized (mRebuildSync) {