From: TrillGates Date: Thu, 19 Aug 2021 06:43:41 +0000 (+0800) Subject: fixed out temperature warning issues. X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=256d31acebfc7e821e3bdc9d5df293ca81f28e8c;p=icsupport.git fixed out temperature warning issues. --- diff --git a/app/src/main/java/com/enqualcomm/support/utils/TemperatureUtil.java b/app/src/main/java/com/enqualcomm/support/utils/TemperatureUtil.java index 530821bd..7a784acf 100644 --- a/app/src/main/java/com/enqualcomm/support/utils/TemperatureUtil.java +++ b/app/src/main/java/com/enqualcomm/support/utils/TemperatureUtil.java @@ -146,24 +146,27 @@ public class TemperatureUtil { createWarningNotification( CoreService.getInstance().getRuntime().getContextProxy().context .getString(R.string.body_temperature_exception_tips_text) - + temperature.getBodyTemp() + "℃)", "body_temperature"); + + temperature.getBodyTemp() + "℃)", "body_temperature", + Constants.WARNING_MSG_TYPE_BODY_TEMP); } else if (resultCode == 3) { //创建警告信息 createWarningNotification( CoreService.getInstance().getRuntime().getContextProxy().context .getString(R.string.out_temp_too_high_text) - + temperature.getBodyTemp() + "℃)", "body_temperature"); + + temperature.getBodyTemp() + "℃)", "body_temperature", + Constants.WARNING_MSG_TYPE_ENV_TEMP); } else if (resultCode == 4) { //创建警告信息 createWarningNotification( CoreService.getInstance().getRuntime().getContextProxy().context .getString(R.string.out_temp_too_low_text) - + temperature.getBodyTemp() + "℃)", "body_temperature"); + + temperature.getBodyTemp() + "℃)", "body_temperature", + Constants.WARNING_MSG_TYPE_ENV_TEMP); } } } - private void createWarningNotification(String title, String type) { + private void createWarningNotification(String title, String type, int contentType) { ContentValues contentValues = new ContentValues(); //分类是心率的包名 contentValues.put(ICDatabaseHelper.notification_category, "com.ic.temperature"); @@ -178,7 +181,7 @@ public class TemperatureUtil { ContentValues warningMsgValues = new ContentValues(); //设置数据 - warningMsgValues.put(ICDatabaseHelper.warning_msg_type, Constants.WARNING_MSG_TYPE_BODY_TEMP); + warningMsgValues.put(ICDatabaseHelper.warning_msg_type, contentType); warningMsgValues.put(ICDatabaseHelper.warning_msg_title, title); warningMsgValues.put(ICDatabaseHelper.warning_msg_has_read, 1); warningMsgValues.put(ICDatabaseHelper.warning_msg_create_time, System.currentTimeMillis());