-[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":10,"versionName":"202005071431","enabled":true,"outputFile":"FactoryMode_V10_202005071431_release.apk","fullName":"release","baseName":"release"},"path":"FactoryMode_V10_202005071431_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":24,"versionName":"202006242233","enabled":true,"outputFile":"FactoryMode_V24_202006242233_release.apk","fullName":"release","baseName":"release"},"path":"FactoryMode_V24_202006242233_release.apk","properties":{}}]
\ No newline at end of file
<action android:name="com.eqc.OffHook.START" />
</intent-filter>
</activity>
+ <activity
+ android:name=".TemperatureAdjustActivity"
+ android:label="@string/tempAdjust" >
+ <intent-filter>
+ <action android:name="com.eqc.STARTTempAdjust" />
+ </intent-filter>
+ </activity>
<activity
android:name=".SimDetectActivity"
android:label="@string/detectSim" />
\r
/*获取血氧值*/\r
public static native int getSPO2();\r
+\r
+\r
+ public static native double getTemperature();\r
}\r
\r
private TextView tv_isweared;\r
private TextView tv_ppg;\r
+ private TextView tv_temperature;\r
@Override\r
protected void onCreate(Bundle savedInstanceState) {\r
super.onCreate(savedInstanceState);\r
}\r
int ppg=ICJniUtils.getPPG();\r
int weared=ICJniUtils.isWeared();\r
-\r
+ double temp=ICJniUtils.getTemperature();\r
\r
String wearedstr=String.valueOf(weared);\r
String ppgstr=String.valueOf(ppg);\r
+ String tempstr=String.format("%1$.2f",temp);\r
tv_isweared.setText(wearedstr);\r
tv_ppg.setText(ppgstr);\r
- Logger.d("Weared:"+wearedstr+" PPG:"+ppgstr);\r
+ tv_temperature.setText(tempstr);\r
+ Logger.d("Weared:"+wearedstr+" PPG:"+ppgstr+" Temperature:"+tempstr);\r
return false;\r
}\r
});\r
\r
tv_isweared=(TextView)findViewById(R.id.tv_weared_value);\r
tv_ppg=(TextView)findViewById(R.id.tv_ppg_value);\r
+ tv_temperature=(TextView)findViewById(R.id.tv_temperature_value);\r
\r
}\r
\r
--- /dev/null
+package mobile.miki;\r
+\r
+import android.content.Context;\r
+import android.content.Intent;\r
+import android.os.Bundle;\r
+import android.os.Handler;\r
+import android.os.Message;\r
+import android.os.PowerManager;\r
+import android.preference.PreferenceManager;\r
+import android.util.Log;\r
+import android.view.View;\r
+import android.widget.TextView;\r
+\r
+import com.ic.jni.ICJniUtils;\r
+\r
+import java.io.File;\r
+import java.io.FileOutputStream;\r
+import java.io.IOException;\r
+import java.util.Timer;\r
+import java.util.TimerTask;\r
+\r
+import mobile.miki.mainui.ButtonViewTwo;\r
+import mobile.miki.mainui.TestMainActivity;\r
+import mobile.miki.mainui.TestMainList;\r
+import mobile.miki.util.Config;\r
+import mobile.miki.util.Logger;\r
+\r
+public class TemperatureAdjustActivity extends BaseActivity implements View.OnClickListener {\r
+\r
+ private ButtonViewTwo buttonView;\r
+ boolean running;\r
+\r
+ Timer mTestTimer=null;\r
+ double avg_temp=0.0f;\r
+ private TextView tv_mesg;\r
+ private TextView tv_temperature;\r
+\r
+ long timestamp_start = 0;\r
+ long adjust_start_seconds_left=300;\r
+ long adjust_timeout_time=300;\r
+ @Override\r
+ protected void onCreate(Bundle savedInstanceState) {\r
+ super.onCreate(savedInstanceState);\r
+ setContentView(R.layout.temperature_adjust_layout);\r
+ initView();\r
+\r
+ timestamp_start=System.currentTimeMillis();\r
+ mTestTimer=new Timer();\r
+ TimerTask HRTimerTask=new TimerTask() {\r
+ @Override\r
+ public void run() {\r
+ mhandler.sendEmptyMessage(0);\r
+ }\r
+ };\r
+ mTestTimer.schedule(HRTimerTask,0,1000L);\r
+\r
+ }\r
+ PowerManager.WakeLock screenOnWakelock=null;\r
+ @Override\r
+ protected void onResume() {\r
+ super.onResume();\r
+ if (screenOnWakelock==null)\r
+ screenOnWakelock = getScreenOnWakeLock(this,GPSActivity.class.getSimpleName());\r
+\r
+ }\r
+ public static PowerManager.WakeLock getScreenOnWakeLock(Context context, String tag) {\r
+ PowerManager.WakeLock wakeLock = ((PowerManager)(context.getSystemService(Context.POWER_SERVICE))).newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, tag);\r
+ wakeLock.acquire();\r
+ return wakeLock;\r
+ }\r
+ @Override\r
+ protected void onPause() {\r
+ super.onPause();\r
+ if(screenOnWakelock!=null) {\r
+ if (screenOnWakelock.isHeld()) {\r
+ screenOnWakelock.release();\r
+ }\r
+ screenOnWakelock=null;\r
+ }\r
+\r
+\r
+ }\r
+ Handler mhandler=new Handler(new Handler.Callback() {\r
+ @Override\r
+ public boolean handleMessage(Message message) {\r
+\r
+ double temp = ICJniUtils.getTemperature();\r
+ String tempstr = String.format("%1$.2f", temp);\r
+ tv_temperature.setText(tempstr);\r
+ Logger.d("Temperature:" + tempstr);\r
+ String header = "体温校准开始,请放置在37摄氏度恒温箱中。剩余 ";\r
+ String tail = "秒。。。";\r
+ long time_cost = (System.currentTimeMillis() - timestamp_start) / 1000;\r
+ adjust_start_seconds_left = (adjust_timeout_time - time_cost);\r
+ if (adjust_start_seconds_left == 0) {\r
+\r
+ tv_mesg.setText("体温校准完毕,偏差数据"+String.format("%1$.2f",(avg_temp-37.0f))+"摄氏度!");\r
+ if(mTestTimer!=null) {\r
+\r
+ mTestTimer.cancel();\r
+ mTestTimer=null;\r
+ }\r
+\r
+ }else{\r
+\r
+ if(adjust_start_seconds_left <=5 && adjust_start_seconds_left > 0) {\r
+ if (avg_temp == 0.0f)\r
+ avg_temp = temp;\r
+ avg_temp = (avg_temp + temp) / 2;//对数据做一定的平均\r
+ }\r
+\r
+ tv_mesg.setText(header + adjust_start_seconds_left + tail);\r
+ }\r
+ return false;\r
+ }\r
+ });\r
+ @Override\r
+ protected void onDestroy() {\r
+ super.onDestroy();\r
+ ICJniUtils.disablePPG();\r
+ if(mTestTimer!=null) {\r
+\r
+ mTestTimer.cancel();\r
+ mTestTimer=null;\r
+ }\r
+ }\r
+\r
+\r
+\r
+ private void initView() {\r
+ buttonView = (ButtonViewTwo) findViewById(R.id.btn_set);\r
+ buttonView.btn_left.setOnClickListener(this);\r
+ buttonView.btn_right.setOnClickListener(this);\r
+ buttonView.setSuccessColor();\r
+ buttonView.btn_left.setClickable(true);\r
+ buttonView.btn_left.setText("Ok");\r
+ buttonView.btn_right.setText("Cancel");\r
+ tv_mesg=(TextView)findViewById(R.id.tv_tempAdjustMsg);\r
+ tv_temperature=(TextView)findViewById(R.id.tv_temperature_value);\r
+\r
+ }\r
+\r
+\r
+ private void save_adjust_value(){\r
+\r
+ if (adjust_start_seconds_left<=0){\r
+ try {\r
+ new FileOutputStream(new File("/productinfo/temp_adjust_37.txt")).write(String.format("%1$.2f",(avg_temp-37.0f)).getBytes());\r
+ Logger.d("write "+String.format("%1$.2f",(avg_temp-37.0f))+" to /productinfo/temp_adjust_37.txt success!");\r
+ } catch (IOException e) {\r
+ e.printStackTrace();\r
+ Logger.d("/productinfo/temp_adjust_37.txt 写入失败!");\r
+ }\r
+\r
+ }\r
+ }\r
+ @Override\r
+ public void onClick(View view) {\r
+\r
+ Intent intent1 = new Intent(this, TestMainList.class);\r
+ // TestResult testResult = (TestResult) getApplicationContext();\r
+ switch (view.getId()) {\r
+\r
+ case R.id.btn_two_left:\r
+ save_adjust_value();\r
+ startActivity(intent1);\r
+ finish();\r
+ break;\r
+ case R.id.btn_two_right:\r
+ startActivity(intent1);\r
+ finish();\r
+ break;\r
+ }\r
+ }\r
+}\r
import mobile.miki.GPSActivity;
import mobile.miki.MyApplication;
import mobile.miki.R;
+import mobile.miki.TemperatureAdjustActivity;
import mobile.miki.VersionActivity;
import mobile.miki.ageingmode.AgeingModeActivity;
import mobile.miki.flow.DownLoad;
private LinearLayout dial;
private LinearLayout flagPosition;
private LinearLayout gpsFulltest;
+ private LinearLayout tempAdjust;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
gpsFulltest = (LinearLayout) findViewById(R.id.gps_full_test);
+ tempAdjust = (LinearLayout)findViewById(R.id.tempAdjustLayout);
flagPosition = (LinearLayout)findViewById(R.id.flagposiontion);
if (!FTUtils.isSugar()) {
flagPosition.setVisibility(View.GONE);
flagPosition.setOnClickListener(this);
shutdown_system.setOnClickListener(this);
gpsFulltest.setOnClickListener(this);
+ tempAdjust.setOnClickListener(this);
// Log.d(TAG, "onCreate");
Settings.System.putInt(getContentResolver(), "mobile.miki.FactoryModeRunning", 1);
Config.initConfig(this);
intent = new Intent(TestMainList.this, GPSActivity.class);
startActivity(intent);
break;
+ case R.id.tempAdjustLayout:
+ intent = new Intent(TestMainList.this, TemperatureAdjustActivity.class);
+ startActivity(intent);
+ break;
default:
break;
}
testResultList.add("keys");\r
testResultList.add("vibrator");\r
testResultList.add("heartrate");\r
+ } else if (FTUtils.isH88()){\r
+\r
+ //list.add(context.getString(R.string.test_keypad));\r
+ list.add(context.getString(R.string.heartrate));\r
+ list.remove(context.getString(R.string.camera));\r
+ //testResultList.add("keys");\r
+ testResultList.add("heartrate");\r
+ testResultList.remove("camera");\r
}\r
stateArr = new String[testResultList.size()];\r
return list;\r
}\r
return false;\r
}\r
+ public static boolean isH88(){\r
+\r
+ if (getMODEL().contains("H88")||SystemProperties.get("ro.product.isH88","").equalsIgnoreCase("true")) {\r
+ return true;\r
+ }\r
+ return false;\r
+ }\r
}\r
android:id="@+id/Factory_test_title"\r
style="@style/category_title_style"\r
android:layout_width="match_parent"\r
- android:layout_height="60dp"\r
+ android:layout_height="50dp"\r
android:gravity="center|center_horizontal"\r
android:text="@string/benji"\r
android:textSize="22sp" />\r
android:textSize="22sp" />\r
</LinearLayout>\r
\r
+ <View\r
+ android:id="@+id/view3"\r
+ android:layout_width="match_parent"\r
+ android:layout_height="wrap_content"\r
+ android:layout_weight="1"\r
+ android:background="#c0c0c0" />\r
+\r
+ <LinearLayout\r
+ android:id="@+id/tempAdjustLayout"\r
+ android:layout_width="match_parent"\r
+ android:layout_height="match_parent"\r
+ android:layout_weight="1"\r
+ android:background="@drawable/listpress"\r
+ android:clickable="true"\r
+ android:gravity="center_vertical"\r
+ android:orientation="vertical">\r
+\r
+ <TextView\r
+ android:id="@+id/textViewTempAdjust"\r
+ style="@style/content_text_medium_style"\r
+ android:layout_width="match_parent"\r
+ android:layout_height="match_parent"\r
+ android:layout_marginTop="2dp"\r
+ android:layout_weight="1"\r
+ android:gravity="center_vertical"\r
+ android:text="@string/Engineer_mode_title"\r
+ android:visibility="gone" />\r
+\r
+ <TextView\r
+ style="@style/title_text_large_style"\r
+ android:layout_width="match_parent"\r
+ android:layout_height="match_parent"\r
+ android:gravity="center"\r
+ android:text="@string/tempAdjust"\r
+ android:textSize="22sp" />\r
+ </LinearLayout>\r
+\r
</LinearLayout>\r
</ScrollView>
\ No newline at end of file
android:layout_height="wrap_content"\r
android:orientation="vertical">\r
\r
+ <LinearLayout\r
+ android:layout_width="match_parent"\r
+ android:layout_height="match_parent"\r
+ android:orientation="horizontal">\r
+\r
+ <TextView\r
+ android:id="@+id/tv_isweared"\r
+ android:layout_width="wrap_content"\r
+ android:layout_height="wrap_content"\r
+ android:text="佩戴 "\r
+ android:textSize="36sp" />\r
+\r
+ <TextView\r
+ android:id="@+id/tv_weared_value"\r
+ android:layout_width="wrap_content"\r
+ android:layout_height="wrap_content"\r
+ android:text="0"\r
+ android:textSize="36sp" />\r
+ </LinearLayout>\r
+\r
<LinearLayout\r
android:layout_width="match_parent"\r
android:layout_height="match_parent"\r
android:orientation="horizontal">\r
\r
<TextView\r
- android:id="@+id/tv_isweared"\r
+ android:id="@+id/tv_temperature"\r
android:layout_width="wrap_content"\r
android:layout_height="wrap_content"\r
- android:text="佩æ\88´ "\r
+ android:text="ä½\93温 "\r
android:textSize="36sp" />\r
\r
<TextView\r
- android:id="@+id/tv_weared_value"\r
+ android:id="@+id/tv_temperature_value"\r
android:layout_width="wrap_content"\r
android:layout_height="wrap_content"\r
android:text="0"\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"\r
+ android:orientation="vertical" android:layout_width="match_parent"\r
+ android:layout_height="match_parent">\r
+\r
+ <LinearLayout\r
+ android:layout_width="match_parent"\r
+ android:layout_height="wrap_content"\r
+ android:orientation="vertical">\r
+\r
+ <LinearLayout\r
+ android:layout_width="match_parent"\r
+ android:layout_height="match_parent"\r
+ android:orientation="horizontal">\r
+\r
+ <TextView\r
+ android:id="@+id/tv_tempAdjustMsg"\r
+ android:layout_width="wrap_content"\r
+ android:layout_height="wrap_content"\r
+ android:text="体温校准开始,请放置在37摄氏度恒温箱中5分钟。。。"\r
+ android:textSize="36sp" />\r
+\r
+ </LinearLayout>\r
+\r
+ <LinearLayout\r
+ android:layout_width="match_parent"\r
+ android:layout_height="match_parent"\r
+ android:orientation="horizontal">\r
+\r
+ <TextView\r
+ android:id="@+id/tv_temperature"\r
+ android:layout_width="wrap_content"\r
+ android:layout_height="wrap_content"\r
+ android:text="测量值:"\r
+ android:textSize="36sp" />\r
+\r
+ <TextView\r
+ android:id="@+id/tv_temperature_value"\r
+ android:layout_width="wrap_content"\r
+ android:layout_height="wrap_content"\r
+ android:text="0"\r
+ android:textSize="36sp" />\r
+ </LinearLayout>\r
+\r
+ </LinearLayout>\r
+\r
+ <mobile.miki.mainui.ButtonViewTwo\r
+ android:id="@+id/btn_set"\r
+ android:layout_width="match_parent"\r
+ android:layout_height="wrap_content"\r
+ android:layout_alignParentBottom="true"\r
+ android:layout_centerHorizontal="true" >\r
+ </mobile.miki.mainui.ButtonViewTwo>\r
+\r
+</RelativeLayout>
\ No newline at end of file
<string name="engineerMode">工程模式</string>\r
<string name="more">更多设置</string>\r
<string name="unbound">解绑</string>\r
+ <string name="tempAdjust">温度校准</string>\r
\r
<string name="startRecord">开始录音</string>\r
<string name="stopRecord">结束录音</string>\r
<string name="modify_imei_sim1">Modify SIM1</string>\r
<string name="modify_imei_sim2">Modify SIM2</string>\r
<string name="input_imei_title">Please enter a new IMEI number</string>\r
- <string name="autoTest">Automatic testing</string>\r
+ <string name="autoTest">Automatic testing自动测试</string>\r
<string name="pcbaTest">PCBA testing</string>\r
<string name="sysVersion">edition</string>\r
<string name="reStore">Restore factory settings</string>\r
<string name="readAPN">APN query</string>\r
<string name="sim_lock_settings">SIM card lock function setting</string>\r
<string name="modify_imei">Modify IMEI number</string>\r
- <string name="testReport">Test report</string>\r
+ <string name="testReport">Test report测试报告</string>\r
<string name="beginTestGPS">Click start GPS test</string>\r
<string name="beginTestTM">Click start FM test</string>\r
<string name="beginTestCamera">Click to start the camera test</string>\r
<string name="vl_up">VLUp</string>\r
<string name="vl_down">VLDown</string>\r
<string name="sos">miaoSoS</string>\r
- <string name="ageing_mode">Ageing mode</string>\r
+ <string name="ageing_mode">Ageing mode老化模式</string>\r
<string name="ageing_speaker_test">Speaker test</string>\r
<string name="ageing_lcd_test">LCD test</string>\r
<string name="ageing_camera_test">Camera test</string>\r
\r
<string name="start_test_new">Start Testing</string>\r
<string name="benji">Factory test</string>\r
- <string name="resunme">Reset</string>\r
- <string name="poweroff">PowerOff</string>\r
+ <string name="resunme">Reset恢复出厂设置</string>\r
+ <string name="poweroff">PowerOff关机</string>\r
<string name="tip2">Logo: pass (green), not pass (red), not measured (white)</string>\r
<string name="clear_new">Clear the test data</string>\r
<string name="version_new">Version and calibration</string>\r
<string name="dual_new">Phone</string>\r
<string name="beiguang_new">Backlight</string>\r
<string name="gps">GPS</string>\r
+ <string name="tempAdjust">Temperature Adjust 温度校准</string>\r
<string name="startRecord">Start recording</string>\r
<string name="stopRecord">Stop recording</string>\r
<string name="startPlay">Start playing</string>\r
-#Mon Jun 15 18:05:53 CST 2020\r
-VERSION_CODE=14\r
+#Wed Jun 24 22:33:02 CST 2020\r
+VERSION_CODE=24\r