am d805c677: Merge "Possible NullPointerException in restorePanelState"

* commit 'd805c67749e7bc80d77028ffa3b58de3b04f621b':
  Possible NullPointerException in restorePanelState
This commit is contained in:
Jean-Baptiste Queru
2012-05-01 06:44:05 -07:00
committed by Android Git Automerger

View File

@@ -1653,7 +1653,9 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
*/
private void restorePanelState(SparseArray<Parcelable> icicles) {
PanelFeatureState st;
for (int curFeatureId = icicles.size() - 1; curFeatureId >= 0; curFeatureId--) {
int curFeatureId;
for (int i = icicles.size() - 1; i >= 0; i--) {
curFeatureId = icicles.keyAt(i);
st = getPanelState(curFeatureId, false /* required */);
if (st == null) {
// The panel must not have been required, and is currently not around, skip it