diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-12-08 00:46:10 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-12-08 00:46:10 +0000 |
commit | 621e2006473899c2047d66e3ef4b49c6d0db5a13 (patch) | |
tree | 80fe0a5265f2cdf0f5187101753837fb43f80807 /src/com/android/launcher3/PendingAppWidgetHostView.java | |
parent | b4a192b5dacd7cf327032d01443665a5e6124182 (diff) | |
parent | d5462aa31b53eb690a3f57c7c6c0cc4021271de6 (diff) | |
download | android_packages_apps_Trebuchet-621e2006473899c2047d66e3ef4b49c6d0db5a13.tar.gz android_packages_apps_Trebuchet-621e2006473899c2047d66e3ef4b49c6d0db5a13.tar.bz2 android_packages_apps_Trebuchet-621e2006473899c2047d66e3ef4b49c6d0db5a13.zip |
Merge "Simplifyling widget inflation and addition flow." into ub-launcher3-master
Diffstat (limited to 'src/com/android/launcher3/PendingAppWidgetHostView.java')
-rw-r--r-- | src/com/android/launcher3/PendingAppWidgetHostView.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/launcher3/PendingAppWidgetHostView.java b/src/com/android/launcher3/PendingAppWidgetHostView.java index 7c9b76bdf..7c92f80f0 100644 --- a/src/com/android/launcher3/PendingAppWidgetHostView.java +++ b/src/com/android/launcher3/PendingAppWidgetHostView.java @@ -65,7 +65,7 @@ public class PendingAppWidgetHostView extends LauncherAppWidgetHostView implemen @TargetApi(Build.VERSION_CODES.LOLLIPOP) public PendingAppWidgetHostView(Context context, LauncherAppWidgetInfo info, - boolean disabledForSafeMode) { + IconCache cache, boolean disabledForSafeMode) { super(new ContextThemeWrapper(context, R.style.WidgetContainerTheme)); mLauncher = Launcher.getLauncher(context); @@ -84,6 +84,10 @@ public class PendingAppWidgetHostView extends LauncherAppWidgetHostView implemen if (Utilities.ATLEAST_LOLLIPOP) { setElevation(getResources().getDimension(R.dimen.pending_widget_elevation)); } + + updateIcon(cache); + updateAppWidget(null); + setOnClickListener(mLauncher); } @Override @@ -119,7 +123,7 @@ public class PendingAppWidgetHostView extends LauncherAppWidgetHostView implemen mDrawableSizeChanged = true; } - public void updateIcon(IconCache cache) { + private void updateIcon(IconCache cache) { Bitmap icon = cache.getIcon(mIconLookupIntent, mInfo.user); if (mIcon == icon) { return; |