am 5016b985: am 898f152d: Merge "Adding additional synchronized blocks when committing changes to the new-apps list. (Bug 6621553)" into jb-dev

* commit '5016b98520b9dbad8cf234a15fded9fb9e805ea2':
  Adding additional synchronized blocks when committing changes to the new-apps list. (Bug 6621553)
This commit is contained in:
Winson Chung
2012-06-12 13:15:18 -07:00
committed by Android Git Automerger
2 changed files with 15 additions and 11 deletions

View File

@@ -190,10 +190,12 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
final Set<String> savedNewApps = newApps;
new Thread("setNewAppsThread") {
public void run() {
sharedPrefs.edit()
.putInt(NEW_APPS_PAGE_KEY, screen)
.putStringSet(NEW_APPS_LIST_KEY, savedNewApps)
.commit();
synchronized (savedNewApps) {
sharedPrefs.edit()
.putInt(NEW_APPS_PAGE_KEY, screen)
.putStringSet(NEW_APPS_LIST_KEY, savedNewApps)
.commit();
}
}
}.start();