Fix a crash that can happen sometimes
This commit is contained in:
parent
56be852dca
commit
6fe7d87ac4
1 changed files with 9 additions and 6 deletions
|
@ -952,12 +952,16 @@ public class ChatMessagesFragment extends Fragment
|
|||
/** File transfer related */
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
if (mFilesUploadLayout != null) {
|
||||
String files[] = new String[mFilesUploadLayout.getChildCount()];
|
||||
for (int i = 0; i < mFilesUploadLayout.getChildCount(); i++) {
|
||||
View child = mFilesUploadLayout.getChildAt(i);
|
||||
String path = (String) child.getTag();
|
||||
files[i] = path;
|
||||
}
|
||||
outState.putStringArray("Files", files);
|
||||
}
|
||||
|
||||
if (mCurrentInputContentInfo != null) {
|
||||
outState.putParcelable(
|
||||
INPUT_CONTENT_INFO_KEY, (Parcelable) mCurrentInputContentInfo.unwrap());
|
||||
|
@ -965,7 +969,6 @@ public class ChatMessagesFragment extends Fragment
|
|||
}
|
||||
mCurrentInputContentInfo = null;
|
||||
mCurrentFlags = 0;
|
||||
outState.putStringArray("Files", files);
|
||||
super.onSaveInstanceState(outState);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue