-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1002,"versionName":"2110281527","enabled":true,"outputFile":"ICSer_V1002_2110281527_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V1002_2110281527_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1003,"versionName":"2111011034","enabled":true,"outputFile":"ICSer_V1003_2111011034_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V1003_2111011034_release.apk","properties":{}}]
\ No newline at end of file
//拨打电话走流程
//只要判断是否需要发短信即可
ICLogger.d("start check need SOS SMS...");
- checkSendSMS(resolver);
+ //是否需要拨号
+ boolean needCall = checkSendSMS(resolver);
+ //需要拨号再拨号
+ if (needCall) {
+ //50ms后开始拨打电话
+ mHandler.postDelayed(mTriggerSOSCALLThread, 1000);
+ }
});
+ } else {
+ if (!Config.SOSNoNeedDial) {
+ //50ms后开始拨打电话
+ mHandler.postDelayed(mTriggerSOSCALLThread, 1000);
+ }
}
//add by TrillGates=====end
runtime.setAlarmType(Runtime.AlarmType.ALARM_SOS);
}
//设置5分钟后结束紧急定位模式
setEmegencyLocationSTOPAlarm(5);
- if (!Config.SOSNoNeedDial) {
- //50ms后开始拨打电话
- mHandler.postDelayed(mTriggerSOSCALLThread, 500);
- }
} else if (ACTION_QUERY_WEATHER.equals(param1Intent.getAction())) {
ICLogger.i("ACTION_QUERY_WEATHER ");
connection.send(protocolAPIHelper.getWeatherMSG(runtime));
}
};
-
/**
* add by TrillGates.
* S123的机器,会根据设置项来判断,SOS的时候是否要发送短信
*
* @param resolver
*/
- private void checkSendSMS(ContentResolver resolver) {
+ private boolean checkSendSMS(ContentResolver resolver) {
Cursor query = resolver.query(Uri.parse(SETTINGS), new String[]{"s_value"}, "s_key=?",
new String[]{"sos_notify_type"}, null);
if (query != null) {
}
if (sosNumbers.size() == 0) {
ICLogger.d("no sos number...");
- return;
+ return value == 3;
}
//发送短信
//获取短信内容
smsManager.sendSMS(sosNumber, smsContent);
}
}
+ // public static final int TYPE_CHECK_PHONE = 1;
+ // public static final int TYPE_CHECK_SMS = 2;
+ // public static final int TYPE_CHECK_PHONE_AND_SMS = 3;
+ return value == 1 || value == 3;
} else {
ICLogger.d("no sos settings value...");
}
query.close();
}
+ return true;
}
+
+
private TriggerSOSCALLThread mTriggerSOSCALLThread = new TriggerSOSCALLThread();
private class TriggerSOSCALLThread implements Runnable {