Skip to content

Commit a46cdc0

Browse files
Adam CohenAndroid Git Automerger
authored andcommitted
am c80f72f: Merge "Fixing issue where you couldn\'t set null RemoteViews for a widget" into jb-dev
* commit 'c80f72f75e8d5b5fa85b694b64510fad74ea345d': Fixing issue where you couldn't set null RemoteViews for a widget
2 parents f1e43f7 + c80f72f commit a46cdc0

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
@@ -819,7 +819,10 @@ public void updateAppWidgetIds(int[] appWidgetIds, RemoteViews views) {
819819
return;
820820
}
821821

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

0 commit comments

Comments
 (0)