[Android] NativeCrashActivity: use StringBuilder
Edward Wang
git at videolan.org
Wed Jul 16 19:24:59 CEST 2014
vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Wed Jul 16 13:24:49 2014 -0400| [00578b8cb56e47ada9ac121a1af267f44a2c1db8] | committer: Edward Wang
NativeCrashActivity: use StringBuilder
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=00578b8cb56e47ada9ac121a1af267f44a2c1db8
---
.../src/org/videolan/vlc/gui/NativeCrashActivity.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/NativeCrashActivity.java b/vlc-android/src/org/videolan/vlc/gui/NativeCrashActivity.java
index 6c7d559..cd87672 100644
--- a/vlc-android/src/org/videolan/vlc/gui/NativeCrashActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/NativeCrashActivity.java
@@ -110,10 +110,12 @@ public class NativeCrashActivity extends Activity {
HttpPost httpPost = new HttpPost("http://people.videolan.org/~magsoft/vlc-android_crashes/upload_crash_log.php");
try {
- String msg = "";
- for (int i = 0; i < params.length; ++i)
- msg += params[i] + "\n";
- httpPost.setEntity(new ByteArrayEntity(compress(msg)));
+ StringBuilder msgBuilder = new StringBuilder();
+ for (int i = 0; i < params.length; ++i) {
+ msgBuilder.append(params[i]);
+ msgBuilder.append("\n");
+ }
+ httpPost.setEntity(new ByteArrayEntity(compress(msgBuilder.toString())));
httpClient.execute(httpPost);
} catch (ClientProtocolException e) {
e.printStackTrace();
More information about the Android
mailing list