diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 27746d238433f1a94da6e5574b0d6823d84de3fa..330a7c98b16e162a3d975886153952162d7e02af 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,10 +1,10 @@ + android:versionCode="30" + android:versionName="2.0" > - + diff --git a/res/drawable-hdpi/checked_icon.png b/res/drawable-hdpi/checked_icon.png index ef99cc5f5e6f164329fd9addd7da0cff9c665016..66727de4115ddd57710ea58bb6104cc96e2e22d0 100644 Binary files a/res/drawable-hdpi/checked_icon.png and b/res/drawable-hdpi/checked_icon.png differ diff --git a/res/drawable-hdpi/seekbar_thumb_normal.png b/res/drawable-hdpi/seekbar_thumb_normal.png new file mode 100644 index 0000000000000000000000000000000000000000..91b9362f84c0695a38863c3f82617ddadd8c81b8 Binary files /dev/null and b/res/drawable-hdpi/seekbar_thumb_normal.png differ diff --git a/res/drawable-hdpi/seekbar_thumb_pressed.png b/res/drawable-hdpi/seekbar_thumb_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..b897d22286c116bb73ea2e79ee83a71da664abb0 Binary files /dev/null and b/res/drawable-hdpi/seekbar_thumb_pressed.png differ diff --git a/res/drawable-hdpi/unchecked_icon.png b/res/drawable-hdpi/unchecked_icon.png index 66727de4115ddd57710ea58bb6104cc96e2e22d0..ef99cc5f5e6f164329fd9addd7da0cff9c665016 100644 Binary files a/res/drawable-hdpi/unchecked_icon.png and b/res/drawable-hdpi/unchecked_icon.png differ diff --git a/res/drawable/custom_seekbar.xml b/res/drawable/custom_seekbar.xml new file mode 100644 index 0000000000000000000000000000000000000000..00981ccb8dda9b47f92d14e3976c47590f1b196d --- /dev/null +++ b/res/drawable/custom_seekbar.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/drawable/seekbar_thumb.xml b/res/drawable/seekbar_thumb.xml new file mode 100644 index 0000000000000000000000000000000000000000..a0028b4be6830c1f53fe32c7c629385da1a01926 --- /dev/null +++ b/res/drawable/seekbar_thumb.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/res/layout/about.xml b/res/layout/about.xml index 03aedd93768d8fe2f0b7f8023f5b870753893da4..0d6c386184b29bbae759d2bb560ea4a7fec9b876 100644 --- a/res/layout/about.xml +++ b/res/layout/about.xml @@ -50,7 +50,7 @@ android:layout_height="wrap_content" android:layout_marginLeft="@dimen/layout_vertical_margin_small" android:gravity="center_vertical" - android:text="Emmagee" + android:text="@string/app_name" android:textColor="@color/black" android:textSize="@dimen/text_size_bigest" /> @@ -65,7 +65,7 @@ @@ -87,38 +86,39 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" - android:padding="@dimen/layout_vertical_margin_small" > + android:orientation="vertical" + android:padding="@dimen/layout_horizontal_margin" > - - - - - - + - - + - + + diff --git a/res/layout/mail_settings.xml b/res/layout/mail_settings.xml index f006ef27b60b0a5ba4d9b085e9c98a8d5adb8246..19bd1fc124aebe3e97e67289bcc1ea5d2bbaa6ad 100644 --- a/res/layout/mail_settings.xml +++ b/res/layout/mail_settings.xml @@ -11,7 +11,6 @@ android:orientation="horizontal" > @@ -53,14 +52,14 @@ android:id="@+id/sender" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:layout_marginTop="5sp" + android:layout_marginTop="@dimen/edit_margin" android:singleLine="true" android:textSize="@dimen/text_size" /> @@ -88,7 +87,7 @@ diff --git a/res/layout/navigation_bar.xml b/res/layout/navigation_bar.xml index 8680e2894ccdcb2b8ccf2d308cb48679a1b16f04..f39430ac52e9653c0d8e874ad9178a4606659dac 100644 --- a/res/layout/navigation_bar.xml +++ b/res/layout/navigation_bar.xml @@ -1,7 +1,7 @@ @@ -10,6 +10,7 @@ android:id="@+id/go_back" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:paddingRight ="@dimen/image_padding" android:src="@drawable/btn_back" /> \ No newline at end of file diff --git a/res/layout/settings.xml b/res/layout/settings.xml index a5b7323fb05414888bdc9e4aeaa02023303d1817..0cdc95b2008f137dae455859f4d8f010e87373ad 100644 --- a/res/layout/settings.xml +++ b/res/layout/settings.xml @@ -11,10 +11,9 @@ android:orientation="horizontal" > + android:layout_height="wrap_content" + layout="@layout/navigation_bar" /> - - - - + android:textSize="@dimen/text_size" + android:textColor="@color/black" > + + + + android:checked="true" + android:paddingRight="@dimen/image_padding" + android:paddingLeft="@dimen/image_padding" /> + @@ -135,11 +147,11 @@ - - + + + \ No newline at end of file diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 8b694bfaa95ad2b8fc8e236934734574c33540e2..0c64fac43f401ca24c3a6333659f31182d071b58 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -8,8 +8,7 @@ 开始测试 停止测试 - 采集频率: - + 采集频率(s) 发件人: 密码: SMTP服务器: @@ -66,6 +65,11 @@ 确定退出程序? 关于 - 邮件发送配置 - + 邮件配置 + 版本 + Emmagee是一个简单易上手的Android性能监测小工具, + 主要用于监控单个App的CPU,内存,流量,电量,电流以及整体性能状态, + 同时支持自定义的监控频率以及性能数据的实时显示. + 开发团队:网易(杭州)质量保障部 + 项目地址:https://github.com/NetEase/Emmagee diff --git a/res/values/dimens.xml b/res/values/dimens.xml index c816c4ffe46c19775855cc7067d42ebd3a6a227e..6933e35969850309a0d48a7e932a2e22f0e712ca 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -18,5 +18,13 @@ 140dp 40dp - + + 10dp + 5dp + + 1px + + 5px + + 60dp diff --git a/res/values/strings.xml b/res/values/strings.xml index b3039aaa9408c09165ab01950b0d19a2e7a7aa42..d417feab250b7504ff244df202bfa61aa702bbd2 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -8,8 +8,7 @@ Start Test Stop Test - Collecting Frequency: - Seconds + Collecting Frequency(s) Sender: Password: SMTP Server: @@ -64,5 +63,14 @@ OK Cancel Are you sure to exit? - + + About + Mail Settings + Version + Emmagee is a practical, handy performance test tool for specified + Android App, which can monitor CPU, memory, network traffic, battery current and status. + Additionally, it also provides several cool features such as customizing interval of collecting + data, rendering real-time process status in a floating window, and much more. + Team:QA, Netease(Hangzhou) + Project Address:https://github.com/NetEase/Emmagee diff --git a/src/com/netease/qa/emmagee/activity/AboutActivity.java b/src/com/netease/qa/emmagee/activity/AboutActivity.java index 8f90a44655d5d24c8ddd186ac23105a57b74aaa2..da63067440e5aecd79da68448b98cb16c98c26f1 100644 --- a/src/com/netease/qa/emmagee/activity/AboutActivity.java +++ b/src/com/netease/qa/emmagee/activity/AboutActivity.java @@ -16,14 +16,6 @@ */ package com.netease.qa.emmagee.activity; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.Properties; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - import android.app.Activity; import android.content.Intent; import android.content.pm.PackageInfo; @@ -33,18 +25,13 @@ import android.util.Log; import android.view.View; import android.view.Window; import android.view.View.OnClickListener; -import android.widget.Button; -import android.widget.CheckBox; -import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; -import android.widget.Toast; import com.netease.qa.emmagee.R; -import com.netease.qa.emmagee.utils.EncryptData; /** - * Setting Page of Emmagee + * About Page of Emmagee * * @author andrewleo */ @@ -76,17 +63,14 @@ public class AboutActivity extends Activity { goBack.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { - Intent intent = new Intent(); - intent.setClass(AboutActivity.this, SettingsActivity.class); - startActivityForResult(intent, Activity.RESULT_FIRST_USER); AboutActivity.this.finish(); } }); } /** - * 获取版本号 - * @return 当前应用的版本号 + * get app version + * @return app version */ public String getVersion() { try { diff --git a/src/com/netease/qa/emmagee/activity/MailSettingsActivity.java b/src/com/netease/qa/emmagee/activity/MailSettingsActivity.java index 6c5fd853f68b19d743b9f72230a8f0aca90d8eb1..52aed3c59f7dc1f061097945165c7e74286fe9bb 100644 --- a/src/com/netease/qa/emmagee/activity/MailSettingsActivity.java +++ b/src/com/netease/qa/emmagee/activity/MailSettingsActivity.java @@ -31,8 +31,6 @@ import android.util.Log; import android.view.View; import android.view.Window; import android.view.View.OnClickListener; -import android.widget.Button; -import android.widget.CheckBox; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; @@ -42,7 +40,7 @@ import com.netease.qa.emmagee.R; import com.netease.qa.emmagee.utils.EncryptData; /** - * Setting Page of Emmagee + * Mail Setting Page of Emmagee * * @author andrewleo */ @@ -116,10 +114,9 @@ public class MailSettingsActivity extends Activity { MailSettingsActivity.this.finish(); } }); - // edtTime.setInputType(InputType.TYPE_CLASS_NUMBER); btnSave.setOnClickListener(new OnClickListener() { @Override - public void onClick(View v) { + public void onClick(View v) { sender = edtSender.getText().toString().trim(); if (!"".equals(sender) && !checkMailFormat(sender)) { Toast.makeText(MailSettingsActivity.this, getString(R.string.sender_mail_toast) + getString(R.string.format_incorrect_format), @@ -146,6 +143,7 @@ public class MailSettingsActivity extends Activity { } try { Properties properties = new Properties(); + properties.load(new FileInputStream(settingTempFile)); properties.setProperty("sender", sender); Log.d(LOG_TAG, "sender=" + sender); try { diff --git a/src/com/netease/qa/emmagee/activity/SettingsActivity.java b/src/com/netease/qa/emmagee/activity/SettingsActivity.java index 432175681d1780ab3a4acc3159b9e0245cc12add..e424119f5255c2a8ed0aec0f4841d45109b3d5be 100644 --- a/src/com/netease/qa/emmagee/activity/SettingsActivity.java +++ b/src/com/netease/qa/emmagee/activity/SettingsActivity.java @@ -19,10 +19,7 @@ package com.netease.qa.emmagee.activity; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; -import java.io.IOException; import java.util.Properties; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import android.app.Activity; import android.content.Intent; @@ -31,12 +28,12 @@ import android.util.Log; import android.view.View; import android.view.Window; import android.view.View.OnClickListener; -import android.widget.Button; import android.widget.CheckBox; -import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; -import android.widget.Toast; +import android.widget.SeekBar; +import android.widget.SeekBar.OnSeekBarChangeListener; +import android.widget.TextView; import com.netease.qa.emmagee.R; import com.netease.qa.emmagee.utils.EncryptData; @@ -48,11 +45,10 @@ import com.netease.qa.emmagee.utils.EncryptData; */ public class SettingsActivity extends Activity { - private static final String LOG_TAG = "Emmagee-" - + SettingsActivity.class.getSimpleName(); + private static final String LOG_TAG = "Emmagee-" + SettingsActivity.class.getSimpleName(); private CheckBox chkFloat; - private EditText edtTime; + private TextView tvTime; private String time; private String settingTempFile; private LinearLayout about; @@ -65,15 +61,16 @@ public class SettingsActivity extends Activity { requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.settings); + Properties properties = new Properties(); final EncryptData des = new EncryptData("emmagee"); Intent intent = this.getIntent(); - settingTempFile = getBaseContext().getFilesDir().getPath() - + "\\EmmageeSettings.properties"; + settingTempFile = getBaseContext().getFilesDir().getPath() + "\\EmmageeSettings.properties"; chkFloat = (CheckBox) findViewById(R.id.floating); - edtTime = (EditText) findViewById(R.id.time); + tvTime = (TextView) findViewById(R.id.time); about = (LinearLayout) findViewById(R.id.about); mailSettings = (LinearLayout) findViewById(R.id.mail_settings); + SeekBar timeBar = (SeekBar) findViewById(R.id.timeline); ImageView btnSave = (ImageView) findViewById(R.id.btn_set); ImageView goBack = (ImageView) findViewById(R.id.go_back); @@ -81,10 +78,9 @@ public class SettingsActivity extends Activity { btnSave.setImageResource(R.drawable.actionbar_bg); try { - Properties properties = new Properties(); properties.load(new FileInputStream(settingTempFile)); - String interval = (null == properties.getProperty("interval"))?"":properties.getProperty("interval").trim(); - String isfloat = (null == properties.getProperty("isfloat"))?"":properties.getProperty("isfloat").trim(); + String interval = (null == properties.getProperty("interval")) ? "" : properties.getProperty("interval").trim(); + String isfloat = (null == properties.getProperty("isfloat")) ? "" : properties.getProperty("isfloat").trim(); time = "".equals(interval) ? "5" : interval; floatingTag = "false".equals(isfloat) ? false : true; } catch (FileNotFoundException e) { @@ -94,27 +90,52 @@ public class SettingsActivity extends Activity { Log.e(LOG_TAG, "Exception: " + e.getMessage()); e.printStackTrace(); } - edtTime.setText(time); + tvTime.setText(time); chkFloat.setChecked(floatingTag); + timeBar.setProgress(Integer.parseInt(time)); + timeBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { + @Override + public void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) { + tvTime.setText(Integer.toString(arg1 + 1)); + } + + @Override + public void onStartTrackingTouch(SeekBar arg0) { + } + + @Override + public void onStopTrackingTouch(SeekBar arg0) { + // when tracking stoped, update properties file + int interval = arg0.getProgress() + 1; + try { + Properties properties = new Properties(); + properties.load(new FileInputStream(settingTempFile)); + properties.setProperty("interval", Integer.toString(interval)); + FileOutputStream fos = new FileOutputStream(settingTempFile); + properties.store(fos, "Setting Data"); + fos.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); goBack.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { SettingsActivity.this.finish(); Intent intent = new Intent(); - intent.setClass(SettingsActivity.this, - MainPageActivity.class); + intent.setClass(SettingsActivity.this, MainPageActivity.class); startActivity(intent); } }); - + mailSettings.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { Intent intent = new Intent(); - intent.setClass(SettingsActivity.this, - MailSettingsActivity.class); - startActivityForResult(intent, Activity.RESULT_FIRST_USER); + intent.setClass(SettingsActivity.this, MailSettingsActivity.class); + startActivity(intent); } }); @@ -123,7 +144,7 @@ public class SettingsActivity extends Activity { public void onClick(View arg0) { Intent intent = new Intent(); intent.setClass(SettingsActivity.this, AboutActivity.class); - startActivityForResult(intent, Activity.RESULT_FIRST_USER); + startActivity(intent); } }); @@ -132,8 +153,8 @@ public class SettingsActivity extends Activity { public void onClick(View arg0) { try { Properties properties = new Properties(); - properties.setProperty("isfloat", - chkFloat.isChecked() ? "true" : "false"); + properties.load(new FileInputStream(settingTempFile)); + properties.setProperty("isfloat", chkFloat.isChecked() ? "true" : "false"); FileOutputStream fos = new FileOutputStream(settingTempFile); properties.store(fos, "Setting Data"); fos.close(); @@ -143,46 +164,6 @@ public class SettingsActivity extends Activity { } } }); - // edtTime.setInputType(InputType.TYPE_CLASS_NUMBER); - // btnSave.setOnClickListener(new OnClickListener() { - // @Override - // public void onClick(View v) { - // time = edtTime.getText().toString().trim(); - // if (!isNumeric(time)) { - // Toast.makeText(SettingsActivity.this, "输入数据无效,请重新输入", - // Toast.LENGTH_LONG).show(); - // edtTime.setText(""); - // } else if ("".equals(time) || Long.parseLong(time) == 0) { - // Toast.makeText(SettingsActivity.this, "输入数据为空,请重新输入", - // Toast.LENGTH_LONG).show(); - // edtTime.setText(""); - // } else if (Integer.parseInt(time) > 600) { - // Toast.makeText(SettingsActivity.this, "数据超过最大值600,请重新输入", - // Toast.LENGTH_LONG).show(); - // } else { - // try { - // Properties properties = new Properties(); - // properties.setProperty("interval", time); - // properties.setProperty("isfloat", - // chkFloat.isChecked() ? "true" : "false"); - // FileOutputStream fos = new FileOutputStream( - // settingTempFile); - // properties.store(fos, "Setting Data"); - // fos.close(); - // Toast.makeText(SettingsActivity.this, - // getString(R.string.save_success_toast), - // Toast.LENGTH_LONG).show(); - // Intent intent = new Intent(); - // setResult(Activity.RESULT_FIRST_USER, intent); - // SettingsActivity.this.finish(); - // } catch (FileNotFoundException e) { - // e.printStackTrace(); - // } catch (IOException e) { - // e.printStackTrace(); - // } - // } - // } - // }); } @Override diff --git a/src/com/netease/qa/emmagee/service/EmmageeService.java b/src/com/netease/qa/emmagee/service/EmmageeService.java index 91395d1ec77925f6175ca2ef814da8b4f24ed5cc..bc46bc7651fa7dec119df36772a4d8b011a391d0 100644 --- a/src/com/netease/qa/emmagee/service/EmmageeService.java +++ b/src/com/netease/qa/emmagee/service/EmmageeService.java @@ -229,13 +229,12 @@ public class EmmageeService extends Service { try { Properties properties = new Properties(); properties.load(new FileInputStream(settingTempFile)); - String interval = properties.getProperty("interval").trim(); - isFloating = "true".equals(properties.getProperty("isfloat").trim()) ? true : false; - sender = properties.getProperty("sender").trim(); - password = properties.getProperty("password").trim(); - recipients = properties.getProperty("recipients").trim(); + String interval = (null == properties.getProperty("interval")) ? "" : properties.getProperty("interval").trim(); + isFloating = "true".equals((null == properties.getProperty("isfloat")) ? "" : properties.getProperty("isfloat").trim()) ? true : false; + sender = (null == properties.getProperty("sender")) ? "" : properties.getProperty("sender").trim(); + password = (null == properties.getProperty("password")) ? "" : properties.getProperty("password").trim(); + recipients = (null == properties.getProperty("recipients")) ? "" : properties.getProperty("recipients").trim(); time = "".equals(interval) ? "5" : interval; - recipients = properties.getProperty("recipients"); receivers = recipients.split("\\s+"); smtp = properties.getProperty("smtp"); } catch (IOException e) { @@ -257,9 +256,11 @@ public class EmmageeService extends Service { else mDateTime = formatter.format(cal.getTime().getTime()); if (android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED)) { - //在4.0以下的低版本上/sdcard连接至/mnt/sdcard,而4.0以上版本则连接至/storage/sdcard0,所以有外接sdcard,/sdcard路径一定存在 - resultFilePath = "/sdcard"+ File.separator + "Emmagee_TestResult_" + mDateTime + ".csv"; - //resultFilePath = android.os.Environment.getExternalStorageDirectory() + File.separator + "Emmagee_TestResult_" + mDateTime + ".csv"; + // 在4.0以下的低版本上/sdcard连接至/mnt/sdcard,而4.0以上版本则连接至/storage/sdcard0,所以有外接sdcard,/sdcard路径一定存在 + resultFilePath = "/sdcard" + File.separator + "Emmagee_TestResult_" + mDateTime + ".csv"; + // resultFilePath = + // android.os.Environment.getExternalStorageDirectory() + + // File.separator + "Emmagee_TestResult_" + mDateTime + ".csv"; } else { resultFilePath = getBaseContext().getFilesDir().getPath() + File.separator + "Emmagee_TestResult_" + mDateTime + ".csv"; } @@ -272,24 +273,21 @@ public class EmmageeService extends Service { long totalMemorySize = memoryInfo.getTotalMemory(); String totalMemory = fomart.format((double) totalMemorySize / 1024); String multiCpuTitle = ""; - // titles of multiple cpu cores + // titles of multiple cpu cores ArrayList cpuList = cpuInfo.getCpuList(); - for(int i =0 ; i < cpuList.size(); i++){ + for (int i = 0; i < cpuList.size(); i++) { multiCpuTitle += "," + cpuList.get(i) + " " + getString(R.string.total_usage); } - bw.write(getString(R.string.process_package) + ": ," + packageName + "\r\n" - + getString(R.string.process_name) + ": ," + processName + "\r\n" - + getString(R.string.process_pid) + ": ," + pid + "\r\n" - + getString(R.string.mem_size) + ": ," + totalMemory + "MB\r\n" - + getString(R.string.cpu_type) + ": ," + cpuInfo.getCpuName() + "\r\n" - + getString(R.string.android_system_version) + ": ," + memoryInfo.getSDKVersion() + "\r\n" - + getString(R.string.mobile_type) + ": ," + memoryInfo.getPhoneType() + "\r\n" - + "UID" + ": ," + uid + "\r\n" - + START_TIME); + bw.write(getString(R.string.process_package) + ": ," + packageName + "\r\n" + getString(R.string.process_name) + ": ," + processName + + "\r\n" + getString(R.string.process_pid) + ": ," + pid + "\r\n" + getString(R.string.mem_size) + ": ," + totalMemory + "MB\r\n" + + getString(R.string.cpu_type) + ": ," + cpuInfo.getCpuName() + "\r\n" + getString(R.string.android_system_version) + ": ," + + memoryInfo.getSDKVersion() + "\r\n" + getString(R.string.mobile_type) + ": ," + memoryInfo.getPhoneType() + "\r\n" + "UID" + + ": ," + uid + "\r\n" + START_TIME); bw.write(getString(R.string.timestamp) + "," + getString(R.string.used_mem_PSS) + "," + getString(R.string.used_mem_ratio) + "," - + getString(R.string.mobile_free_mem) + "," + getString(R.string.app_used_cpu_ratio) + "," + getString(R.string.total_used_cpu_ratio) - + multiCpuTitle +"," + getString(R.string.traffic) + "," + getString(R.string.battery) + "," + getString(R.string.current) + "," - + getString(R.string.temperature) + "," + getString(R.string.voltage) + "\r\n"); + + getString(R.string.mobile_free_mem) + "," + getString(R.string.app_used_cpu_ratio) + "," + + getString(R.string.total_used_cpu_ratio) + multiCpuTitle + "," + getString(R.string.traffic) + "," + + getString(R.string.battery) + "," + getString(R.string.current) + "," + getString(R.string.temperature) + "," + + getString(R.string.voltage) + "\r\n"); } catch (IOException e) { Log.e(LOG_TAG, e.getMessage()); } @@ -507,10 +505,8 @@ public class EmmageeService extends Service { public void closeOpenedStream() { try { if (bw != null) { - bw.write(getString(R.string.comment1) + "\r\n" - + getString(R.string.comment2) + "\r\n" - + getString(R.string.comment3) + "\r\n" - + getString(R.string.comment4) + "\r\n"); + bw.write(getString(R.string.comment1) + "\r\n" + getString(R.string.comment2) + "\r\n" + getString(R.string.comment3) + "\r\n" + + getString(R.string.comment4) + "\r\n"); bw.close(); } if (osw != null)