Fixing custom widgets support:

> Moving the definitions to xml so that it is easier to override in derivative projects
> Fixing verious bind and save logic for custom widgets
> Adding feature flag to easily disable custom widgets

Change-Id: I0e278bc7dd415713029364060ef10842da990be9
This commit is contained in:
Sunny Goyal committed 2017-09-13 14:04:35 -07:00
1 parent be213def87
commit 952e63d006
22 files changed
+363 -205

No files matched your search

@@ -22,7 +22,6 @@ import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Build;
import android.os.CancellationSignal;
import android.os.Handler;
import android.os.UserHandle;
@@ -412,7 +411,8 @@ public class WidgetPreviewLoader {
// Draw icon in the center.
try {
Drawable icon = info.getIcon(launcher, mIconCache);
Drawable icon =
mIconCache.getFullResIcon(info.provider.getPackageName(), info.icon);
if (icon != null) {
int appIconSize = launcher.getDeviceProfile().iconSizePx;
int iconSize = (int) Math.min(appIconSize * scale,