/** Restores the visibility of the child EditTexts, and mHideOptional. */
  @Override
  protected void onRestoreInstanceState(Parcelable state) {
    SavedState ss = (SavedState) state;
    super.onRestoreInstanceState(ss.getSuperState());

    mHideOptional = ss.mHideOptional;

    int numChildren = Math.min(mFieldEditTexts.length, ss.mVisibilities.length);
    for (int i = 0; i < numChildren; i++) {
      mFieldEditTexts[i].setVisibility(ss.mVisibilities[i]);
    }
  }
  /** Restores the visibility of the child EditTexts, and mHideOptional. */
  @Override
  protected void onRestoreInstanceState(Parcelable state) {
    SavedState ss = (SavedState) state;
    super.onRestoreInstanceState(ss.getSuperState());

    mHideOptional = ss.mHideOptional;

    /** M: New Feature @{ */
    /* Original Code
    int numChildren = Math.min(mFieldEditTexts.length, ss.mVisibilities.length);
    for (int i = 0; i < numChildren; i++) {
        mFieldEditTexts[i].setVisibility(ss.mVisibilities[i]);
    }
    */
    if (null != mFieldEditTexts) {
      int numChildren = Math.min(mFieldEditTexts.length, ss.mVisibilities.length);
      for (int i = 0; i < numChildren; i++) {
        mFieldEditTexts[i].setVisibility(ss.mVisibilities[i]);
      }
    }
    /** @} */
  }