summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Launcher.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2014-08-11 17:05:23 -0700
committerSunny Goyal <sunnygoyal@google.com>2014-08-12 16:00:03 -0700
commit0fc1be164e982433e619bcbb16aa67e28ff681ef (patch)
treeb72e41365906b7619407950d41375afb6eed5dc3 /src/com/android/launcher3/Launcher.java
parent0fe505bf82a265e51c556d7204976651cde7f55c (diff)
downloadandroid_packages_apps_Trebuchet-0fc1be164e982433e619bcbb16aa67e28ff681ef.tar.gz
android_packages_apps_Trebuchet-0fc1be164e982433e619bcbb16aa67e28ff681ef.tar.bz2
android_packages_apps_Trebuchet-0fc1be164e982433e619bcbb16aa67e28ff681ef.zip
Updating the ui for widget restore flow
> Pending widget show a PreloadIconDrawable to indicate installation progress > Only the concerned widgets are reinflated on package install and not the whole workspace. > Adding support for storing default package icon in IconCache issue: 10779035 issue: 16737660 Change-Id: Id787ae4a5ef72d6e01aeb5a1bae5ab8840037679
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r--src/com/android/launcher3/Launcher.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 5eedc8a3a..062e84838 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -23,7 +23,6 @@ import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.animation.ValueAnimator;
-import android.animation.ValueAnimator.AnimatorUpdateListener;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.ActivityManager;
@@ -90,10 +89,8 @@ import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import android.view.Window;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
-import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
-import android.view.animation.LinearInterpolator;
import android.view.inputmethod.InputMethodManager;
import android.widget.Advanceable;
import android.widget.FrameLayout;
@@ -4445,7 +4442,9 @@ public class Launcher extends Activity
item.hostView = mAppWidgetHost.createView(this, appWidgetId, appWidgetInfo);
} else {
appWidgetInfo = null;
- item.hostView = new PendingAppWidgetHostView(this, item.restoreStatus);
+ PendingAppWidgetHostView view = new PendingAppWidgetHostView(this, item);
+ view.updateIcon(mIconCache);
+ item.hostView = view;
item.hostView.updateAppWidget(null);
item.hostView.setOnClickListener(this);
}
@@ -4478,10 +4477,7 @@ public class Launcher extends Activity
return;
}
- PendingAppWidgetHostView pendingView = (PendingAppWidgetHostView) view;
- pendingView.setStatus(LauncherAppWidgetInfo.RESTORE_COMPLETED);
-
- LauncherAppWidgetInfo info = (LauncherAppWidgetInfo) pendingView.getTag();
+ LauncherAppWidgetInfo info = (LauncherAppWidgetInfo) view.getTag();
info.restoreStatus = LauncherAppWidgetInfo.RESTORE_COMPLETED;
mWorkspace.reinflateWidgetsIfNecessary();