X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/9a2f6c6c4b2428350eaa52979e816e1cebf08530..4c17d77a6cfb386c6c36348d9d9860d79863a882:/src/com/owncloud/android/ui/preview/PreviewTextFragment.java diff --git a/src/com/owncloud/android/ui/preview/PreviewTextFragment.java b/src/com/owncloud/android/ui/preview/PreviewTextFragment.java index 1be63998..107b2a2f 100644 --- a/src/com/owncloud/android/ui/preview/PreviewTextFragment.java +++ b/src/com/owncloud/android/ui/preview/PreviewTextFragment.java @@ -81,12 +81,13 @@ public class PreviewTextFragment extends FileFragment { Bundle args = getArguments(); - if (file == null) + if (file == null){ file = args.getParcelable(FileDisplayActivity.EXTRA_FILE); + } - if (mAccount == null) + if (mAccount == null) { mAccount = args.getParcelable(FileDisplayActivity.EXTRA_ACCOUNT); - + } if (savedInstanceState == null) { if (file == null) { @@ -137,8 +138,8 @@ public class PreviewTextFragment extends FileFragment { @Override protected StringWriter doInBackground(java.lang.Object... params) { - if (params.length != 2) - throw new IllegalArgumentException("The parameters to " + TextLoadAsyncTask.class.getName() + " must be (1) the file location and (2) the text view to update"); + if (params.length != 2) { + throw new IllegalArgumentException("The parameters to " + TextLoadAsyncTask.class.getName() + " must be (1) the file location and (2) the text view to update");} final String location = (String) params[0]; mTextView = (TextView) params[1]; @@ -195,7 +196,7 @@ public class PreviewTextFragment extends FileFragment { * Dismiss loading dialog */ public void dismissLoadingDialog() { - Fragment frag = getActivity().getSupportFragmentManager().findFragmentByTag(DIALOG_WAIT_TAG); + final Fragment frag = getActivity().getSupportFragmentManager().findFragmentByTag(DIALOG_WAIT_TAG); if (frag != null) { LoadingDialog loading = (LoadingDialog) frag; loading.dismiss();