Adding additional synchronized blocks when committing changes to the new-apps list. (Bug 6621553)
Change-Id: Ia2553321230fec4202fa064cdc66ffd13d005281
This commit is contained in:
@@ -191,10 +191,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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user