diff options
author | Alexandru Moscu <moscu.alex@gmail.com> | 2016-03-18 21:46:11 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-03-19 17:33:31 +0000 |
commit | c9c78dc1a57fecb291e8b98b3e67eb92e5ca12e2 (patch) | |
tree | db0bb37b290da28b19516ea3d213e900feed9793 /android | |
parent | c0737674ad7ca6af2ada0b8b42f55e9ed46d87db (diff) |
formatting and whitespace
Change-Id: Icc086404a2ef32a38e972da9158f6156fdf74ef2
Reviewed-on: https://gerrit.libreoffice.org/23363
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'android')
-rwxr-xr-x[-rw-r--r--] | android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index dba7cffbc7ca..1cbdabb32edf 100644..100755 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -138,7 +138,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity { Log.d(LOGTAG, "SCHEME_CONTENT: getPath(): " + getIntent().getData().getPath()); } else { // TODO: can't open the file - Log.e(LOGTAG, "couldn't create temporary file from "+getIntent().getData()); + Log.e(LOGTAG, "couldn't create temporary file from " + getIntent().getData()); } } else if (getIntent().getData().getScheme().equals(ContentResolver.SCHEME_FILE)) { mInputFile = new File(getIntent().getData().getPath()); @@ -203,7 +203,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity { try { AssetFileDescriptor assetFD = contentResolver.openAssetFileDescriptor(getIntent().getData(), "r"); if (assetFD == null) { - Log.e(LOGTAG, "couldn't create assetfiledescriptor from "+getIntent().getDataString()); + Log.e(LOGTAG, "couldn't create assetfiledescriptor from " + getIntent().getDataString()); return false; } inputChannel = assetFD.createInputStream().getChannel(); @@ -215,7 +215,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity { while (bytesTransferred < inputChannel.size()) { bytesTransferred += outputChannel.transferFrom(inputChannel, bytesTransferred, inputChannel.size()); } - Log.e(LOGTAG, "Success copying "+bytesTransferred+ " bytes"); + Log.e(LOGTAG, "Success copying " + bytesTransferred + " bytes"); return true; } finally { if (inputChannel != null) inputChannel.close(); @@ -336,7 +336,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity { if (isFinishing()) { // Not an orientation change if (mTempFile != null) { - //noinspection ResultOfMethodCallIgnored + // noinspection ResultOfMethodCallIgnored mTempFile.delete(); } } @@ -560,9 +560,9 @@ public class LibreOfficeMainActivity extends AppCompatActivity { boolean res = true; for (String file : files) { - String[] dirOrFile = assetManager.list(fromAssetPath+"/"+file); + String[] dirOrFile = assetManager.list(fromAssetPath + "/" + file); if ( dirOrFile.length == 0) { - //noinspection ResultOfMethodCallIgnored + // noinspection ResultOfMethodCallIgnored new File(targetDir).mkdirs(); res &= copyAsset(assetManager, fromAssetPath + "/" + file, @@ -588,14 +588,14 @@ public class LibreOfficeMainActivity extends AppCompatActivity { source = Channels.newChannel(assetManager.open(fromAssetPath)); dest = new FileOutputStream(toPath).getChannel(); long bytesTransferred = 0; - // might not copy all at once, so make sure everything gets copied.... + // might not copy all at once, so make sure everything gets copied.... ByteBuffer buffer = ByteBuffer.allocate(4096); - while (source.read(buffer)>0) { + while (source.read(buffer) > 0) { buffer.flip(); bytesTransferred += dest.write(buffer); buffer.clear(); } - Log.v(LOGTAG, "Success copying "+fromAssetPath+" to "+toPath + " bytes: "+bytesTransferred); + Log.v(LOGTAG, "Success copying " + fromAssetPath + " to " + toPath + " bytes: " + bytesTransferred); return true; } finally { if (dest != null) dest.close(); |