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

Commit fb5f1bc0 authored by Adam Powell's avatar Adam Powell
Browse files

Log a warning when action bar view states cannot be restored.

Some apps can get into a case where the saved view hierarchy states
for action bar views are missing. Log a warning instead of crashing.

Bug 6510800

Change-Id: I95ede64ec584892e6e76ca9ab9d53e9d3689984f
parent f82e7693
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1630,7 +1630,12 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
        if (mActionBar != null) {
            SparseArray<Parcelable> actionBarStates =
                    savedInstanceState.getSparseParcelableArray(ACTION_BAR_TAG);
            if (actionBarStates != null) {
                mActionBar.restoreHierarchyState(actionBarStates);
            } else {
                Log.w(TAG, "Missing saved instance states for action bar views! " +
                        "State will not be restored.");
            }
        }
    }