Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8a720d8 authored by Romain Guy's avatar Romain Guy
Browse files

Fix possible NPE in the code that restores widgets' state.

Bug #2189714
Reviewed by: ryanpc

Change-Id: I0d74deb6dc8e90e3b0eafd6b3c16b0c557c72873
parent 30a6657e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -123,7 +123,8 @@ public class AppWidgetHostView extends FrameLayout {

    @Override
    protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) {
        final ParcelableSparseArray jail = (ParcelableSparseArray) container.get(generateId());
        ParcelableSparseArray jail = (ParcelableSparseArray) container.get(generateId());
        if (jail == null) jail = new ParcelableSparseArray();
        super.dispatchRestoreInstanceState(jail);
    }