import com.enqualcomm.support.utils.TemperatureUtil;
import com.enqualcomm.support.utils.TimeUtil;
import com.enqualcomm.support.utils.Util;
+import com.enqualcomm.support.utils.VibrateUtil;
import com.ic.protocols.protocolAPIHelper;
import java.util.concurrent.LinkedBlockingDeque;
.append("\nDate ").append(msg.getDate()).append(msg.getTime())
.append("\nflag ").append(msg.haveSent())
.append("\ntopic ").append(msg.cmd());
- if(Config.protocol_no == Config.PROTOCOL_GATOR){
- if(msg.isFromCache().length()>8) {
+ if (Config.protocol_no == Config.PROTOCOL_GATOR) {
+ if (msg.isFromCache().length() > 8) {
sb.append("\norigin ").append(AESCipher.aesDecryptStringFixedKey(msg.isFromCache().substring(8)));
}
}
ICLogger.i("voicepacket " + voicepacket.getName() + " filetype " + voicepacket.getFiletype() + " , datatype " + voicepacket.getDateType() + " " + voicepacket.getPacketTime() + " send " + (voicepacket.getCurrentIndexToSent() + 1) + "/" + voicepacket.getPacketCount());
if (mConnection instanceof NettyConnection) {
((NettyConnection) mConnection).sendMsg("RAWPACKET",
- protocolAPIHelper.getVoicePacketItem(voicepacket.getSender(),voicepacket.getDurationHex(),voicepacket.getPacketTime(),
+ protocolAPIHelper.getVoicePacketItem(voicepacket.getSender(), voicepacket.getDurationHex(), voicepacket.getPacketTime(),
voicepacket.getPacketCount(),
(voicepacket.getCurrentIndexToSent() + 1),
voicepacket.getVoicePacketWithIndex(voicepacket.getCurrentIndexToSent()).getPacketLen(),
);
}
} else {
- ICLogger.i("voicepacket Sender "+voicepacket.getSender()+" duration 0x"+voicepacket.getDurationHex()+" " + voicepacket.getName() + " filetype " + voicepacket.getFiletype() + " , datatype " + voicepacket.getDateType() + " " + voicepacket.getPacketTime() + " sent Done!");
+ ICLogger.i("voicepacket Sender " + voicepacket.getSender() + " duration 0x" + voicepacket.getDurationHex() + " " + voicepacket.getName() + " filetype " + voicepacket.getFiletype() + " , datatype " + voicepacket.getDateType() + " " + voicepacket.getPacketTime() + " sent Done!");
}
return true;
} else if ("PhotoRemoteTaken".equals(paramStringMessage.cmd())) {
//创建voiceConent并添加到数据
final VoiceContent voiceContent = VoiceContent.placeHolderOut(CONTACT_CATEGORY_GROUP,
- "123", msgUrl,"0000", 2, 2);
+ "123", msgUrl, "0000", 2, 2);
// 把voiceContent拆解成1024的分包
- Util.parseToVoicePacketSent(voiceContent,1024);
+ Util.parseToVoicePacketSent(voiceContent, 1024);
//trigger 分包发送
if (CoreService.getInstance().getConnection() != null) {
//H88 专用功能拍照时检测用户体温心率
return true;
} else if ("poweroffCheckSim".equals(paramStringMessage.cmd())) {
paramRuntime.setShutdown(true);
-
if (SimSignalUtil.hasSimCard(paramRuntime.getContextProxy().context)) {
ICLogger.i("Has Sim Card Skip poweroff!");
Util.ShowToast(paramRuntime, "Has Sim Card Skip poweroff!");
} else {
Util.ShowToast(paramRuntime, "Do poweroff!");
}
+ VibrateUtil.getInstance(paramRuntime.getContextProxy().context).
+ vibrate(new long[]{1000, 500, 1000, 500, 1000}, -1);
mSendMSGHandler.postDelayed(new Runnable() {
@Override
public void run() {
* * * 1 语音—— 1.监听语音 * 2.SOS语音 * 3.扩展
* * * 2 图片—— 1.签到图片 * 2.指令图片 * 3.设备图片 * 4.扩展
*/
- final VoiceContent voiceContent = VoiceContent.placeHolderOut(CONTACT_CATEGORY_GROUP, "123","0000", recordfilepath, 1, 1);
+ final VoiceContent voiceContent = VoiceContent.placeHolderOut(CONTACT_CATEGORY_GROUP, "123", "0000", recordfilepath, 1, 1);
// 把voiceContent拆解成1024的分包
- Util.parseToVoicePacketSent(voiceContent,1024);
+ Util.parseToVoicePacketSent(voiceContent, 1024);
//trigger 分包发送
if (CoreService.getInstance().getConnection() != null)
CoreService.getInstance().getConnection().DeliverCMDMessageToSystem("SentVoicePacket", "");
WifiListWakeLock = Deliver.WakeLockForGetWifiList(mRuntime);
//尝试connect 指定networkid
- if ( Util.connectWifiByReflectMethod(mRuntime.getContextProxy().context, networkid) == null/*连接wifi出错*/ ) {
+ if (Util.connectWifiByReflectMethod(mRuntime.getContextProxy().context, networkid) == null/*连接wifi出错*/) {
ICLogger.i("连接失败 则重试");
SystemClock.sleep(3000L);
//如果失败 通过enableNetwork 连接指定networkid
//首先停止所有网络自动连接。
- for (WifiConfiguration c: wifiManager.getConfiguredNetworks()){
+ for (WifiConfiguration c : wifiManager.getConfiguredNetworks()) {
wifiManager.disableNetwork(c.networkId);
}
//接着自动裂解wifi
- if( !wifiManager.enableNetwork(networkid, true))
- {
+ if (!wifiManager.enableNetwork(networkid, true)) {
ICLogger.i("连接再次失败 ");
/*如果 连接 指定wifi networkid 再次失败*/
//所有连接都失败了, wifi还不是用户手动打开的,那么就关闭wifi