Skip to content

Commit 172cb76

Browse files
Adam CohenAndroid (Google) Code Review
authored andcommitted
Merge "Fixing onRestoreInstanceState crash in Launcher" into jb-mr1-dev
2 parents c9e94ea + 6ccf4e2 commit 172cb76

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/java/android/appwidget/AppWidgetHostView.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,12 @@ protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) {
226226

227227
if (jail == null) jail = new ParcelableSparseArray();
228228

229-
super.dispatchRestoreInstanceState(jail);
229+
try {
230+
super.dispatchRestoreInstanceState(jail);
231+
} catch (Exception e) {
232+
Log.e(TAG, "failed to restoreInstanceState for widget id: " + mAppWidgetId + ", "
233+
+ (mInfo == null ? "null" : mInfo.provider), e);
234+
}
230235
}
231236

232237
/**

0 commit comments

Comments
 (0)