}
preBuild {
-
doLast {
def imlFile = file(project.name + ".iml")
println 'Change ' + project.name + '.iml order'
HeartRateManager.getInstance().triggerPPGTest(FROM_SERVER);
}
}
-
CoreService.getInstance().getConnection().DeliverCMDMessageToSystem("SentVoicePacket", "");
}
return true;
\r
String mNumber;\r
\r
- private int mOrientation;\r
private int custom_camera_orientation = 0;\r
private int custom_camera_mirror = 0;\r
private Camera.Parameters mPs;\r
\r
- private Camera.ShutterCallback shutterCallback = new Camera.ShutterCallback() {\r
- public void onShutter() {\r
- ICLogger.i("camera shutterCallback");\r
- }\r
- };\r
+ private Camera.ShutterCallback shutterCallback = () -> ICLogger.i("camera shutterCallback");\r
\r
private SurfaceTexture surfaceTexture;\r
\r
byte b = 0;\r
while (b < i) {\r
Camera.getCameraInfo(b, cameraInfo);\r
-\r
if (cameraInfo.facing == 0) {\r
try {\r
camera = Camera.open(b);\r
}\r
\r
private String savePicture(byte[] paramArrayOfByte) {\r
-\r
int jpg_quality = Util.getSystemPropertiesInt("persist.sys.capture_quality", 50);\r
String str = null;\r
try {\r
str = stringBuilder.toString();\r
Bitmap bitmap1 = BitmapFactory.decodeByteArray(paramArrayOfByte, 0, paramArrayOfByte.length);\r
Bitmap bitmap2 = bitmap1;\r
-\r
-\r
-// if ((this.context.getResources().getConfiguration()).orientation == 1) {\r
custom_camera_mirror = Util.getSystemPropertiesInt("persist.sys.camera_cap_mirror", 0);\r
Matrix matrix = new Matrix();\r
matrix.reset();\r
bitmap3 = ImageUtil.drawTextToLeftTop(this.context, bitmap2, TimeUtil.getSystemTimeForCameraMark(), 50, Color.RED, 25, 25);\r
}\r
File file = new File(str);\r
- if (!file.exists())\r
+ if (!file.exists()) {\r
file.createNewFile();\r
+ }\r
BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(new FileOutputStream(file));\r
bitmap3.compress(Bitmap.CompressFormat.JPEG, jpg_quality, bufferedOutputStream);\r
bufferedOutputStream.flush();\r
bufferedOutputStream.close();\r
-\r
ICLogger.i("camera Take Photo and Save to " + str);\r
}\r
return str;\r
try {\r
this.mCamera.setPreviewDisplay(surfaceView.getHolder());\r
this.mPs = this.mCamera.getParameters();\r
- String picsize = Util.getSystemProperties("persist.sys.camera_capsize", "640x480");\r
-\r
- if (!picsize.trim().isEmpty()) {\r
- String sizes[] = picsize.toLowerCase().split("x");\r
+ String picSize = Util.getSystemProperties("persist.sys.camera_capsize", "640x480");\r
+ if (!picSize.trim().isEmpty()) {\r
+ String sizes[] = picSize.toLowerCase().split("x");\r
if (sizes.length == 2) {\r
try {\r
int tmpw = Integer.parseInt(sizes[0]);\r
width = tmpw;\r
height = tmph;\r
} catch (Exception e) {\r
+ e.printStackTrace();\r
}\r
}\r
}\r
}\r
\r
public int getDisplayRotation(Context paramContext) {\r
- int i = ((WindowManager) paramContext.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation();\r
-\r
- StringBuilder stringBuilder = new StringBuilder();\r
- stringBuilder.append("camera getDisplayRotation rotation=");\r
- stringBuilder.append(i);\r
- ICLogger.i(stringBuilder.toString());\r
-\r
+ int i = ((WindowManager) paramContext\r
+ .getSystemService(Context.WINDOW_SERVICE))\r
+ .getDefaultDisplay().getRotation();\r
+ String stringBuilder = "camera getDisplayRotation rotation=" + i;\r
+ ICLogger.i(stringBuilder);\r
switch (i) {\r
default:\r
return 0;\r
} else {\r
paramInt = (custom_camera_orientation - paramInt + 360) % 360;\r
}\r
- /*\r
- if (cameraInfo.facing == 1) {\r
- paramInt = (360 - (cameraInfo.orientation + paramInt) % 360) % 360;\r
- } else {\r
- paramInt = (cameraInfo.orientation - paramInt + 360) % 360;\r
- }*/\r
-\r
ICLogger.i("camera final display orientation " + paramInt);\r
-\r
paramCamera.setDisplayOrientation(paramInt);\r
- this.mOrientation = paramInt;\r
}\r
}\r
\r
String[] cmdlist = cmd.split(CMDSPLIT);
if (cmdlist.length >= 4) {
- String imei = cmdlist[1];
String id = cmdlist[2];
String cdd = cmdlist[3];
if (cmdlist.length == 5) {
Context context = mRuntime.getContextProxy().context.getApplicationContext();
if (cdd.equals("1")) {
//delay 启动
-
// Intent intent = new Intent(context, com.enqualcomm.support.CoreService.class);
// intent.setAction(ACTION_REMOTE_CAMERA);
// intent.putExtra("remote_number", id);
// context.startService(intent);
// runtime.getContextProxy().context.sendBroadcast(intent);
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- (new CameraUtil(context)).getPicture(id);
- }
- });
-
+ mHandler.post(() -> (new CameraUtil(context)).getPicture(id));
} else if (cdd.equals("2")) {
Intent intent = new Intent();
intent.setAction(DIALOG_ACTION);
* 8:冻结小雨
* 9:小雨
* 10:冻雨
- * 11:é\98µé\9b¨
+ * 11:雨
* 12:阵雨
* 13:雪飘雪
* 14:小雪阵雨
<string name="close_text">Close</string>
<string name="commit_text">Confirm</string>
<string name="sport_aim_achieve_tips_text">Congratulations!</string>
- <string name="oxygen_exception_tips_text">血氧异常(</string>
- <string name="heart_rate_exception_tips_text">心率异常(BPM</string>
- <string name="blood_presure_exception_tips_text">血压异常(</string>
- <string name="body_temperature_exception_tips_text">体温异常(</string>
- <string name="web_sms_title_text">Web短信提醒</string>
- <string name="close_tips_text">关闭</string>
- <string name="low_power_warning_text">低电量报警</string>
- <string name="sos_warning_msg_text">SOS紧急报警</string>
+ <string name="oxygen_exception_tips_text">Oxygen Warning(</string>
+ <string name="heart_rate_exception_tips_text">Heart rate warning(BPM</string>
+ <string name="blood_presure_exception_tips_text">BP Warning(</string>
+ <string name="body_temperature_exception_tips_text">Temperature Warning(</string>
+ <string name="web_sms_title_text">Web Msg</string>
+ <string name="close_tips_text">Close</string>
+ <string name="low_power_warning_text">Power low</string>
+ <string name="sos_warning_msg_text">SOS Call</string>
<string name="sos_sms_content_text">SOS was sent from "%s". %s</string>
- <string name="read_text">已阅读</string>
- <string name="reply_text">回复</string>
- <string name="send_msg_error_tips_text">发送失败请重试</string>
- <string name="send_success_tips_text">发送成功</string>
- <string name="back_text">返回</string>
- <string name="send_text">发送</string>
+ <string name="read_text">READ</string>
+ <string name="reply_text">REPLY</string>
+ <string name="send_msg_error_tips_text">Send Failed</string>
+ <string name="send_success_tips_text">Send Success</string>
+ <string name="back_text">Back</string>
+ <string name="send_text">Send</string>
<string name="receiver_we_talk_msg">We talk msg.</string>
- <string name="alarm_pill_time_tips">吃药提醒</string>
- <string name="alarm_drink_time_tips_text">喝水提醒</string>
- <string name="alarm_sit_too_long_tips_text">久坐提醒</string>
- <string name="alarm_text">闹钟</string>
- <string name="out_temp_too_high_text">环境温度过高</string>
- <string name="out_temp_too_low_text">环境温度过低</string>
- <string name="tips_charge_text">低电,请充电</string>
- <string name="urgent_call_text">紧急呼救</string>
- <string name="battery_to_low">电量过低</string>
- <string name="device_shutdown_tips_text">设备随时关机,请及时充电</string>
- <string name="sms_title_text">短信</string>
+ <string name="alarm_pill_time_tips">Take pill</string>
+ <string name="alarm_drink_time_tips_text">Drink Tips</string>
+ <string name="alarm_sit_too_long_tips_text">Sit too long</string>
+ <string name="alarm_text">Alarm</string>
+ <string name="out_temp_too_high_text">Env Temp too high</string>
+ <string name="out_temp_too_low_text">Env Temp too low</string>
+ <string name="tips_charge_text">Please charge</string>
+ <string name="urgent_call_text">Urgent call</string>
+ <string name="battery_to_low">Power low</string>
+ <string name="device_shutdown_tips_text">Charge or will shutdown</string>
+ <string name="sms_title_text">SMS</string>
</resources>