Skip to content

Commit e582746

Browse files
author
Adam Cohen
committed
Fixing issue where you couldn't set null RemoteViews for a widget
-> As noted here: http://code.google.com/p/android/issues/detail?id=35014 Change-Id: Id5d1c47b6961d4b448453d8b16700801c0137f2b
1 parent f8d05b4 commit e582746

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

services/java/com/android/server/AppWidgetServiceImpl.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,10 @@ public void updateAppWidgetIds(int[] appWidgetIds, RemoteViews views) {
817817
return;
818818
}
819819

820-
int bitmapMemoryUsage = views.estimateMemoryUsage();
820+
int bitmapMemoryUsage = 0;
821+
if (views != null) {
822+
bitmapMemoryUsage = views.estimateMemoryUsage();
823+
}
821824
if (bitmapMemoryUsage > mMaxWidgetBitmapMemory) {
822825
throw new IllegalArgumentException("RemoteViews for widget update exceeds maximum" +
823826
" bitmap memory usage (used: " + bitmapMemoryUsage + ", max: " +

0 commit comments

Comments
 (0)