From: Jorge Antonio Diaz-Benito Soriano Date: Wed, 24 Jun 2015 20:14:58 +0000 (+0200) Subject: Added braces to single-line if statements X-Git-Tag: oc-android-1.8~17^2~8^2~3 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/4c17d77a6cfb386c6c36348d9d9860d79863a882?hp=--cc Added braces to single-line if statements --- 4c17d77a6cfb386c6c36348d9d9860d79863a882 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();