diff --git a/src/main/java/com/owncloud/android/ui/fragment/FileDetailActivitiesFragment.java b/src/main/java/com/owncloud/android/ui/fragment/FileDetailActivitiesFragment.java index f20d8a0124..d9aa56c13c 100644 --- a/src/main/java/com/owncloud/android/ui/fragment/FileDetailActivitiesFragment.java +++ b/src/main/java/com/owncloud/android/ui/fragment/FileDetailActivitiesFragment.java @@ -336,4 +336,12 @@ public class FileDetailActivitiesFragment extends Fragment implements ActivityLi public void onActivityClicked(RichObject richObject) { // TODO implement activity click } + + @Override + public void onSaveInstanceState(@NonNull Bundle outState) { + super.onSaveInstanceState(outState); + + outState.putParcelable(FileActivity.EXTRA_FILE, file); + outState.putParcelable(FileActivity.EXTRA_ACCOUNT, account); + } } diff --git a/src/main/java/com/owncloud/android/ui/fragment/FileDetailSharingFragment.java b/src/main/java/com/owncloud/android/ui/fragment/FileDetailSharingFragment.java index 215a35a6f6..32a020ace6 100644 --- a/src/main/java/com/owncloud/android/ui/fragment/FileDetailSharingFragment.java +++ b/src/main/java/com/owncloud/android/ui/fragment/FileDetailSharingFragment.java @@ -459,4 +459,12 @@ public class FileDetailSharingFragment extends Fragment implements UserListAdapt setShareByLinkInfo(false); } } + + @Override + public void onSaveInstanceState(@NonNull Bundle outState) { + super.onSaveInstanceState(outState); + + outState.putParcelable(FileActivity.EXTRA_FILE, file); + outState.putParcelable(FileActivity.EXTRA_ACCOUNT, account); + } }