summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Launcher.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2011-02-28 13:47:29 -0800
committerWinson Chung <winsonc@google.com>2011-02-28 14:54:46 -0800
commitf7640c8bba304ba99c99afcd7393893eccc9a0d9 (patch)
treee6c1d85dccef07845563cfb73d09924d69b39d1d /src/com/android/launcher2/Launcher.java
parent60b753b4cfa709efa55e05cdcd62a993330f3684 (diff)
downloadandroid_packages_apps_Trebuchet-f7640c8bba304ba99c99afcd7393893eccc9a0d9.tar.gz
android_packages_apps_Trebuchet-f7640c8bba304ba99c99afcd7393893eccc9a0d9.tar.bz2
android_packages_apps_Trebuchet-f7640c8bba304ba99c99afcd7393893eccc9a0d9.zip
Fixing strict mode issues.
Change-Id: Ia4fb1f76e608ba1944b79e520444e229802f275a
Diffstat (limited to 'src/com/android/launcher2/Launcher.java')
-rw-r--r--src/com/android/launcher2/Launcher.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 261569ef6..b95feaf5e 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -1223,7 +1223,7 @@ public final class Launcher extends Activity
* @param appWidgetId The app widget id
* @param cellInfo The position on screen where to create the widget.
*/
- private void completeAddAppWidget(int appWidgetId, int screen) {
+ private void completeAddAppWidget(final int appWidgetId, int screen) {
AppWidgetProviderInfo appWidgetInfo = mAppWidgetManager.getAppWidgetInfo(appWidgetId);
// Calculate the grid spans needed to fit this widget
@@ -1253,7 +1253,16 @@ public final class Launcher extends Activity
}
if (!foundCellSpan) {
- if (appWidgetId != -1) mAppWidgetHost.deleteAppWidgetId(appWidgetId);
+ if (appWidgetId != -1) {
+ // Deleting an app widget ID is a void call but writes to disk before returning
+ // to the caller...
+ final LauncherAppWidgetHost appWidgetHost = mAppWidgetHost;
+ new Thread("deleteAppWidgetId") {
+ public void run() {
+ mAppWidgetHost.deleteAppWidgetId(appWidgetId);
+ }
+ }.start();
+ }
showOutOfSpaceMessage();
return;
}