Skip to content

Commit

Permalink
Fixed: #25 report unavailable path of csv while test ending
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewleo committed Sep 2, 2014
1 parent a50baea commit 505eb12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.netease.qa.emmagee"
android:versionCode="1"
android:versionName="1.0" >
android:versionCode="20"
android:versionName="1.3.2" >

<uses-sdk android:minSdkVersion="7" />
<application android:name=".utils.MyApplication"
Expand Down
5 changes: 3 additions & 2 deletions src/com/netease/qa/emmagee/service/EmmageeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,10 @@ private void createResultCsv() {
mDateTime = formatter.format(cal.getTime().getTime() + 8 * 60 * 60 * 1000);
else
mDateTime = formatter.format(cal.getTime().getTime());

if (android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED)) {
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";
}
Expand Down

0 comments on commit 505eb12

Please sign in to comment.