diff options
author | Winson Chung <winsonc@google.com> | 2012-04-09 16:09:56 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-04-09 16:09:56 -0700 |
commit | 6f778dc3762a5483f010f0fee952dade12c3e2a9 (patch) | |
tree | 12b8cbe94fa168bde67d5712e76387116fbf56fe | |
parent | 3cbb169bcf193193786818ee3c61defdc95cfd92 (diff) | |
download | android_packages_apps_Trebuchet-6f778dc3762a5483f010f0fee952dade12c3e2a9.tar.gz android_packages_apps_Trebuchet-6f778dc3762a5483f010f0fee952dade12c3e2a9.tar.bz2 android_packages_apps_Trebuchet-6f778dc3762a5483f010f0fee952dade12c3e2a9.zip |
Revert "Fixing strict mode warning when installing an app in the bg."
This reverts commit 3cbb169bcf193193786818ee3c61defdc95cfd92
-rw-r--r-- | src/com/android/launcher2/InstallShortcutReceiver.java | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/com/android/launcher2/InstallShortcutReceiver.java b/src/com/android/launcher2/InstallShortcutReceiver.java index 651bdaff2..4c0974fd3 100644 --- a/src/com/android/launcher2/InstallShortcutReceiver.java +++ b/src/com/android/launcher2/InstallShortcutReceiver.java @@ -102,8 +102,8 @@ public class InstallShortcutReceiver extends BroadcastReceiver { } private boolean installShortcut(Context context, Intent data, ArrayList<ItemInfo> items, - String name, Intent intent, final int screen, boolean shortcutExists, - final SharedPreferences sharedPrefs, int[] result) { + String name, Intent intent, int screen, boolean shortcutExists, + SharedPreferences sharedPrefs, int[] result) { if (findEmptyCell(context, items, mCoordinates, screen)) { if (intent != null) { if (intent.getAction() == null) { @@ -122,15 +122,10 @@ public class InstallShortcutReceiver extends BroadcastReceiver { newApps = sharedPrefs.getStringSet(NEW_APPS_LIST_KEY, newApps); } newApps.add(intent.toUri(0).toString()); - 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(); - } - }.start(); + sharedPrefs.edit() + .putInt(NEW_APPS_PAGE_KEY, screen) + .putStringSet(NEW_APPS_LIST_KEY, newApps) + .commit(); // Update the Launcher db LauncherApplication app = (LauncherApplication) context.getApplicationContext(); |