Fix for User edit info dialog during rotation

[issue]
1. Go to Settings > System > Multiple users;
2. Edit user info;
3. Take a picture in portrait mode;
4. Turn the device to landscape mode;

Observe selected image is not retained;

[rootcause]
Fragments no longer need to check if the dialog
is showing up during onSaveInstanceState.

[test]
1. Edit user info;
2. Select a picture;
3. Turn the device to landscape mode;
This commit is contained in:
Rafael Matias de Lima
2020-02-07 11:35:48 -03:00
parent 4f4c05addb
commit 9ddd3445f0

View File

@@ -83,8 +83,7 @@ public class EditUserInfoController {
}
public void onSaveInstanceState(Bundle outState) {
if (mEditUserInfoDialog != null && mEditUserInfoDialog.isShowing()
&& mEditUserPhotoController != null) {
if (mEditUserInfoDialog != null && mEditUserPhotoController != null) {
// Bitmap cannot be stored into bundle because it may exceed parcel limit
// Store it in a temporary file instead
File file = mEditUserPhotoController.saveNewUserPhotoBitmap();