public interface Constants {
- String ACTION_LED = "com.enqualcomm.support.ACTION_LED";
-
String ACTION_SHUTDOWN = "com.ic.action.shutdown";
String ACTION_PLAYTIME = "com.ic.action.playtime";
String ACTION_BROADCAST_PPG = "com.enqualcomm.support.ACTION_BROADCAST_PPG";
- String ACTION_ADDTEST_CONTACTS = "com.enqualcomm.imessage.ACTION_ADDTEST_CONTACTS";
String ACTION_ALARM_ADD_DATAPOINTS = "com.enqualcomm.support.ADD_DATAPOINTS";
String ACTION_ALARM_BLE_SCAN = "com.ic.Action.ALarm.bleScan";
- String ACTION_ALARM_CHECK_ANTI = "com.ic.Action.ALarm.CheckAnti";
String ACTION_ALARM_ALARM_CHANGE = "com.enqualcomm.support.ACTION_ALARM_ALARM_CHANGE";
String ACTION_ALARM_DELETE_ALARM = "com.ic.alarm.action.DELETE_ALARM";
String ACTION_ANTIOFF_ALARM_CHANGE = "com.enqualcomm.support.ACTION_ANTIOFF_ALARM_CHANGE";
- String ACTION_AT_CALLBACK = "com.eqc.intent.action.callback.at";
-
- String ACTION_BATTERY_LOW_MSG = "com.enqualcomm.support.lowbatteryMsg";
-
- String ACTION_CALL_CMCM_SERVICE_INTERFACE = "com.cmcm.interface";
-
- String ACTION_CALL_RING = "com.enqualcomm.support.phone.ring";
-
String ACTION_IC_ALARM = "com.ic.alarm.action.ALARM";
String ACTION_CLOSE_UNREAD_MSG = "com.enqualcomm.support.CloseUnreadMsg";
- String ACTION_CM_POWERSAVE_MODE = "cmcm.call.eiot.into.powersave";
-
String ACTION_EQC_ALARM = "com.enqualcomm.support.ACTION_EQC_ALARM";
String ACTION_LOCATION_ALARM = "com.enqualcomm.support.ACTION_LOCATION_ALARM";
-
- String ACTION_EXIT_MONITOR_MODE = "com.enqualcomm.support.MONITOR_EXIT";
-
String ACTION_HEATR_RATE_START = "com.eqc.heartrate.action.SILENT_START";
String ACTION_CHECK_ANTIOFF_EVENT = "com.ic.action.CHECK_ANTIOFF_EVENT";
String ACTION_CHECK_CUTOFF_EVENT = "com.ic.action.CHECK_CUTOFF_EVENT";
String ACTION_ISCONNECTED = "com.ic.protocol.ACTION_IS_SERVER_CONNECTED";
- String ACTION_ISSILENCE = "com.enqualcomm.icare.ACTION_ISSILENCE";
-
- String ACTION_ISSILENCE2IMESSAGE = "com.enqualcomm.support.ACTION_ISSILENCE2IMESSAGE";
-
- String ACTION_MISSED_CALL_GET = "com.enqualcomm.support.ACTION_MISSED_CALL_GET";
-
- String ACTION_NOTICE_ALARM = "com.enqualcomm.support.ACTION_NOTICE_ALARM";
-
- String ACTION_NOTICE_ALARM_CHANGE = "com.enqualcomm.support.ACTION_NOTICE_ALARM_CHANGE";
-
- String ACTION_PASS_DATA_TO_CM_SERVICES = "com.enqualcomm.support.PASS_DATA";
-
String ACTION_REMOTE_CAMERA = "com.enqualcomm.support.ACTION_REMOTE_CAMERA";
- String ACTION_REMOTE_CAMERA_OSS = "com.enqualcomm.support.ACTION_REMOTE_CAMERA_OSS";
-
- String ACTION_RESTORE_SYSTEM = "android.intent.action.MASTER_CLEAR";
-
- String ACTION_SCANPAIRMESSAGE = "com.enqualcomm.imessage.scanPairMessage";
-
- String ACTION_SEDN_VIDOE_CALL_REQ = "com.enqualcomm.imessage.sendVideoCall";
-
- String ACTION_SEND_SOS_MSG = "com.enqualcomm.support.action_send_sos";
-
String ACTION_SEND_EMEGENCY_LOCATION_START = "action.emegency.location.start";
String ACTION_SEND_EMEGENCY_LOCATION_STOP = "action.emegency.location.stop";
String ACTION_LOCAL_SOS_ACTION = "com.enqualcomm.support.local_sos";
- String ACTION_SEND_SOS_VIDEO_FILE = "com.enqualcomm.support.action_send_sos_video_file";
-
- String ACTION_SEND_VIDEO_FILES = "com.enqualcomm.support.ACTION_SEND_VIDEO_FILES";
-
- String ACTION_SHUTDOWN_MOREINFO = "android.intent.action.ACTION_SHUTDOWN_MOREINFO";
-
- String ACTION_SOS_VIDEO_CHAT = "com.enqualcomm.imessage.ACTION_SOS_VIDEO_CHAT";
-
- String ACTION_START_DOWNLOAD = "com.enqualcomm.imessage.START_DOWNLOAD_ACTION";
-
- String ACTION_SYNC = "SYNC";
-
- String ACTION_UNBOUND_TERMINAL = "com.enqualcomm.support.ACTION_UNBOUND_TERMINAL";
-
- String ACTION_UPDATE_ICON = "com.enqualcomm.support.ACTION_UPDATE_ICON";
-
- String ACTION_UPDATE_SECRET_KEY = "com.enqualcomm.support.UPDATE_SECRET_KEY";
-
- String ACTION_VIDEO_END_CALL = "com.enqualcomm.support.ACTION_VIDEO_END_CALL";
-
- String ACTION_VIDEO_LOGIN = "com.enqualcomm.imessage.ACTION_VIDEO_LOGIN";
-
- String ACTION_VIDEO_LOGOUT = "com.enqualcomm.imessage.ACTION_VIDEO_LOGOUT";
-
- String ACTION_VIDEO_RECEIVE_LOGIN = "com.enqualcomm.imessage.ACTION_VIDEO_RECEIVE_LOGIN";
-
String ACTION_WAKEUP_ALARM = "com.eqc.deliverWakeupAlarm.action";
- String ACTION_YUN_ALARM_CHANGE = "com.eqc.deskclock.YUN_ALARM_CHANGE";
-
String ACTION_PRACTICE_REPORT_ALARM = "com.enqualcomm.support.PRACTICE_ALARM";
- public static String ACTION_START_PRACTISE = "com.ic.action_start_practice";
- public static String KeyPractice = "cmd";
-
- int ALARM_UPDATE_NOTICE = 206;
- int CALL_RECORD_CHANGED = 103;
-
- String CMD_ID_CM = "cmdId";
Uri CONTACT_URI = Uri.parse("content://com.enqualcomm.support/contact");
- Uri CM_SERVICE_SETTING = Uri.parse("content://com.cmcm.service/cmsetting");
String DIALOG_ACTION = "com.enqualcomm.support.DIALOG";
String DIALOG_ACTION_WITH_IC_RESPONSE = "com.ic.dialog.action.DIALOG_RESPONSE";
- int ENTER_SILENT_MODE = 212;
-
- int EXIT_SILENT_MODE = 213;
-
- String FLAG = "flag";
-
String TEMP_ALARM = "com.enqualcomm.support.TEMP_ALARM";
String HEARTBEAT_ALARM = "com.enqualcomm.support.HEARTBEAT_ALARM";
- int IDLE_MODE_CHANGED = 102;
-
- int INIT_SERVER_OK = 216;
-
- int IN_SILENCE = 600;
-
- boolean IS_OVERSEAS = false;
-
- int JUFENG_SDK_INIT = 215;
-
- String KEY_CATEGORY = "category";
-
- String KEY_COMPANY = "KEY_COMPANY";
-
- String KEY_CONTACT_ID = "contact_id";
-
- String KEY_DELETE_FILE_TIME = "KEY_DELETE_FILE_TIME";
-
- String KEY_DEVICE_ID = "key_device_id";
-
- String KEY_DEVICE_KEY = "key_device_key";
-
- String KEY_FILEPATH = "filepath";
-
- String KEY_FILETYPE = "filetype";
-
- String KEY_ID = "id";
-
- String KEY_ISCONNECTED = "isConnected";
-
- String KEY_ISSILENCE = "KEY_ISSILENCE";
-
- String KEY_IS_RESUME = "key_is_resume";
-
- String KEY_JUST_TALK = "KEY_JUST_TALK";
-
- String KEY_NAME = "name";
-
- String KEY_NET_WORK_TYPE = "NET_WORK_TYPE";
-
- String KEY_NUMBER = "number";
-
- String KEY_PAIR_CID = "PAIR_CID";
-
- String KEY_REMOTE_NUMBER = "key_remote_number";
-
String KEY_SAVE_STEP_COUNT = "key_save_step_count";
- String KEY_SOS_FILE_BODY = "key_sos_file_body";
-
- String KEY_SOS_FILE_FILE_TYPE = "key_sos_file_file_type";
-
- String KEY_STATUS = "key_status";
-
String KEY_STEP_COUNT = "KEY_STEP_COUNT";
- String KEY_UNBOUND_FLAG = "KEY_UNBOUND_FLAG";
-
- String KEY_VIDEO_PATH = "KEY_VIDEO_PATH";
-
- int LOCATION_DATA = 217;
-
- int MONITOR_GOIN = 202;
-
- int MONITOR_GOOUT = 203;
-
- int MSG_WHAT_RELOAD_VOICE = 1000;
-
- int MSG_WHAT_SEND_OSSFILE = 1006;
-
- int MSG_WHAT_SEND_PAIR = 1003;
-
- int MSG_WHAT_SEND_PICTURE = 1002;
-
- int MSG_WHAT_SEND_VOICE = 1001;
-
- int MSG_WHAT_SILENCE_STATUS = 1005;
-
- int MSG_WHAT_VIDEO_CHAT = 1004;
-
- int MSG_WHAT_PPG = 1007;
- String key_ppg = "ppg";
- String key_bph = "bph";
- String key_bpl = "bpl";
- String key_spo2 = "sp02";
-
-
- int NEW_MEDIA_PUSH = 100;
-
String ACTION_SMS_RECEIVED = "android.provider.Telephony.SMS_RECEIVED";
String OTHER_ALARM_END = "com.enqualcomm.support.OTHER_ALARM_END";
String OTHER_ALARM_START = "com.enqualcomm.support.OTHER_ALARM_START";
String ALARM_POWER_OFF = "com.ic.power.ACTION_ALARM_POWER_OFF";
- String OTHER_HEARTRATE_ALARM_END = "com.enqualcomm.support.OTHER_HEARTRATE_ALARM_END";
-
- String OTHER_HEARTRATE_ALARM_START = "com.enqualcomm.support.OTHER_HEARTRATE_ALARM_START";
-
- int OUT_SILENCE = 700;
-
- int PASS_DATA_DIRECTLY = 500;
-
- int PLAY_RECORD_UPDATE = 207;
-
- int REBOOT_SYSTEM = 208;
-
- int RESET_SYSTEM = 210;
-
- String RESTORE_EXTRA_WIPE_EXTERNAL_STORAGE = "android.intent.extra.WIPE_EXTERNAL_STORAGE";
-
- String RESTORE_REASON = "android.intent.extra.REASON";
-
String ACTION_START_FOTA_UPDATE = "com.ic.action.startfotaUpdate";
String ACTION_SMSCMD = "com.enqualcomm.support.SMSCMD";
String ACTION_SMSCMD_TEST = "com.ic.action.internaltest";
- int RESULT_ERROR = 500;
-
- int RESULT_OK = 200;
-
String RESUME_ACTION = "com.enqualcomm.imessage.RESUME_ACTION";
String SERVICE_CLS_NAME = "com.enqualcomm.support.CoreService";
String SERVICE_PKG_NAME = "com.enqualcomm.support";
- int SHUTDOWN_SYSTM = 209;
String SLEEP_ALARM = "com.enqualcomm.support.SLEEP_ALARM";
- String SOS_ACTION = "com.enqualcomm.imessage.SOS_ACTION";
-
- int SOS_GOIN = 204;
-
- int SOS_GOOUT = 205;
String STEP_COUNT_ALARM_ACTION = "com.enqualcomm.support.ACTION_STEP_COUNT_ALARM";
- String STRING_CMD_JSON_DATA = "cmdJsonData";
-
- String STWORKMODE_ALARM = "com.enqualcomm.support.ACTION_STWORKMODE_ALARM";
-
- String VALUE_SETTIING_VERSION = "value_setting_ver";
-
- int VIDEO_MESSAGE = 300;
String WAKE_ALARM = "com.enqualcomm.support.WAKE_ALARM";
- String WEATHER_ALARM = "com.ic.alarm.ACTION_WEATHER_ALARM";
- String WEATHER_ACTION = "com.ic.action.ACTION_GET_WEATHER";
String ACTION_QUERY_WEATHER = "com.ic.action_query_weather";
String ACTION_WEATHER_RECEIVED = "com.ic.action_weather_recveived";
String KEY_Weather = "weather";
-
- int WIFI_SET_RESULT = 217;
-
- int WORKMODE_CHANGED = 211;
-
String contact = "contact";
-
- String wechat_contact = "content";
-
-
String ACTION_CHECK_SERVER_RESPONSE = "com.enqualcomm.support.ACTION_CHECK_SERVER_RESPONSE";
String ACTION_RETRY_SERVER_CONNECT = "com.enqualcomm.support.ACTION_RETRY_SERVER_CONNECT";
String ACTION_CHECK_LOCATION_RESULT = "com.enqualcomm.support.ACTION_CHECK_LOCATION_RESULT";
String KEY_MESSAGE_FROM = "msgFrom"; // 消息来源(发送者名称),预留,暂时不用。
- String ACTION_TEMP_RESULT = "com.ic.action.temp_result";
- String KEY_TEMP_BODY = "body"; // double 体温
- String KEY_TEMP_WRIST = "wrist"; // double 腕温
- String KEY_TEMP_OUT = "out"; // double 腕温
-
String ACTION_ANTI_OFF0 = "com.ic.ACTION_ANTIOFF";
String ACTION_CUT_OFF = "com.ic.ACTION_STRIP";
String KEY_ANTI_EVENT = "eventID"; //integer eventID =1 脱落, eventID =0 佩戴
*/
String KEY_SIT_RANGE = "sit_range";
-
- /***
- * 内部定时器用action alarm
- */
- String ACTION_SIT_ALARM = "com.ic.action.sit_alarm_local";
-
/**
* 发送给app做显示用
*/
import static com.enqualcomm.support.Constants.ACTION_ANTIOFF_ALARM_CHANGE;
import static com.enqualcomm.support.Constants.ACTION_CLOSE_UNREAD_MSG;
import static com.enqualcomm.support.Constants.ACTION_IC_ALARM;
-import static com.enqualcomm.support.Constants.ACTION_NOTICE_ALARM_CHANGE;
public class SilentManager extends AbstractInvokeHandlerService {
return this.mDbHelper.queryAntioff(true);
}
-
- private ArrayList<Silent> querySilent() {
- return this.mDbHelper.querySilence(true);
- }
-
private void setNewAlarm(List<Alarm> alarmArrayList) {
for (Alarm alarm : alarmArrayList) {
Log.d("setNewAlarm======", "alarm == > " + alarm);
this.mInSilent = this.isSilentTime();
this.mAlarmReceiver = new AlarmReceiver();
IntentFilter intentFilter = new IntentFilter();
- intentFilter.addAction(ACTION_NOTICE_ALARM_CHANGE);
intentFilter.addAction(ACTION_ALARM_ALARM_CHANGE);
intentFilter.addAction(ACTION_ALARM_DELETE_ALARM);
intentFilter.addAction(ACTION_ALARM_SILENT2_UPDATE);
ICLogger.e(e.getMessage(), e);
}
}
- } else if ("com.enqualcomm.support.ACTION_NOTICE_ALARM".equals(action)) {
- String alarmTime = intent.getDataString();
- if (this.isIdle(this.mContext)) {
- try {
- intent = new Intent("com.enqualcomm.icare.NOTICE", Uri.parse(alarmTime));
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- this.mContext.startActivity(intent);
- } catch (Exception e) {
- e.printStackTrace();
- ICLogger.e(e.getMessage(), e);
- }
- }
} else {
ICLogger.i("静默闹钟来了");
- boolean silentchange;
- if (!"com.eqc.heartrate.action.SILENT_START".equals(action) && !"com.enqualcomm.support.OTHER_HEARTRATE_ALARM_START".equals(action)) {
- silentchange = false;
- } else {
- silentchange = true;
- }
- //this.handleSilent(runtime, silentchange ^ true);
}
return false;
}
class AlarmReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
- StringBuilder var3 = new StringBuilder();
- var3.append("action = ");
- var3.append(action);
- ICLogger.i(var3.toString());
- if (ACTION_NOTICE_ALARM_CHANGE.equals(action)) {
- //SilentManager.this.voiceNotice = SilentManager.this.queryNotice();
- } else if (ACTION_ALARM_ALARM_CHANGE.equals(action)) {
+ ICLogger.d("action ==> " + action);
+ if (ACTION_ALARM_ALARM_CHANGE.equals(action)) {
//这是英卡的闹钟库
updateIcAlarm();
} else if (ACTION_ANTIOFF_ALARM_CHANGE.equals(action)) {
startHour, startMinute, alarmStartId,
Integer.parseInt(aChar + ""),
"上课禁用开始" + startValue,
- 2, AlarmManagerUtil.ALARM_SILENT_ACTION);
+ 2, AlarmManagerUtil.ALARM_SILENT_START_ACTION);
//结束时间
String targetEndAlarm = SILENT_ALARM_REQUEST_CODE_END_PREFIX + idValue + aChar;
int alarmEndId = Integer.parseInt(targetEndAlarm);
endHour, endMinute, alarmEndId,
Integer.parseInt(aChar + ""),
"上课禁用结束" + endValue,
- 2, AlarmManagerUtil.ALARM_SILENT_ACTION);
+ 2, AlarmManagerUtil.ALARM_SILENT_END_ACTION);
}
} else {
//单次
String targetStartAlarm = SILENT_ALARM_REQUEST_CODE_START_PREFIX + idValue + aChar;
int alarmStartId = Integer.parseInt(targetStartAlarm);
ICLogger.d("alarmStartId ==> " + alarmStartId);
- AlarmManagerUtil.cancelAlarm(mContext, AlarmManagerUtil.ALARM_SILENT_ACTION, alarmStartId);
+ AlarmManagerUtil.cancelAlarm(mContext, AlarmManagerUtil.ALARM_SILENT_START_ACTION, alarmStartId);
//
String targetEndAlarm = SILENT_ALARM_REQUEST_CODE_END_PREFIX + idValue + aChar;
int alarmEndId = Integer.parseInt(targetEndAlarm);
ICLogger.d("alarmEndId ==> " + alarmEndId);
- AlarmManagerUtil.cancelAlarm(mContext, AlarmManagerUtil.ALARM_SILENT_ACTION, alarmEndId);
+ AlarmManagerUtil.cancelAlarm(mContext, AlarmManagerUtil.ALARM_SILENT_END_ACTION, alarmEndId);
}
}
//判断当前是否需要开启,设置config里的比状态即可
public static final String SILENT_KEY = "is_force_to_silent";
- private void updateSettingAsSilent(boolean isSilent) {
+ public void updateSettingAsSilent(boolean isSilent) {
mHandler.post(() -> {
ICLogger.d("isSilent ==> " + isSilent);
ContentValues contentValues = new ContentValues();