Merge "Fixing issue where you couldn't set null RemoteViews for a widget" into jb-dev

This commit is contained in:
Adam Cohen
2012-07-16 15:29:44 -07:00
committed by Android (Google) Code Review

View File

@@ -819,7 +819,10 @@ class AppWidgetServiceImpl {
return;
}
int bitmapMemoryUsage = views.estimateMemoryUsage();
int bitmapMemoryUsage = 0;
if (views != null) {
bitmapMemoryUsage = views.estimateMemoryUsage();
}
if (bitmapMemoryUsage > mMaxWidgetBitmapMemory) {
throw new IllegalArgumentException("RemoteViews for widget update exceeds maximum" +
" bitmap memory usage (used: " + bitmapMemoryUsage + ", max: " +