Skip to content

Commit 6ccf4e2

Browse files
author
Adam Cohen
committed
Fixing onRestoreInstanceState crash in Launcher
-> Issue 7084152 Change-Id: Ic91074adfff5918e6471c861313a51d0a179ad08
1 parent 5ce25d7 commit 6ccf4e2

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)