public interface Constants {
+ String ACTION_START_PRACTISE = "com.ic.action_start_practice";
+ String KeyPractice = "cmd";
+
String ACTION_SHUTDOWN = "com.ic.action.shutdown";
String ACTION_PLAYTIME = "com.ic.action.playtime";
String ACTION_PRACTICE_REPORT_ALARM = "com.enqualcomm.support.PRACTICE_ALARM";
-
Uri CONTACT_URI = Uri.parse("content://com.enqualcomm.support/contact");
}
}
- private Runnable mupdatePracticeData = new Runnable() {
- @Override
- public void run() {
- //ICHttpUtil.uploadData(Runtime.healthInfo.getBufferDataStr(),runtime,TimeUtil.getSystemTime2(),null);
- Deliver.sendLocationMSG(protocolAPIHelper.getPRACTICE());
- //发送过后重置
- Runtime.healthInfo.resetBuffer();
- }
+ private Runnable updatePracticeData = () -> {
+ //ICHttpUtil.uploadData(Runtime.healthInfo.getBufferDataStr(),runtime,TimeUtil.getSystemTime2(),null);
+ Deliver.sendLocationMSG(protocolAPIHelper.getPRACTICE());
+ //发送过后重置
+ Runtime.healthInfo.resetBuffer();
};
private final BroadcastReceiver broadcastPracticeCMDReceiver = new BroadcastReceiver() {
//超过30次发送数据给服务器
ICLogger.i("自由锻炼结束,发送数据给服务器 "
+ Runtime.healthInfo.getBufferData().length);
- mHandler.post(mupdatePracticeData);
+ mHandler.post(updatePracticeData);
}
}
}
//添加自由锻炼 接收
intentFilter = new IntentFilter();
- intentFilter.addAction(Constants.ACTION_START_PRACTISE);
+ //intentFilter.addAction(Constants.ACTION_START_PRACTISE);
registerReceiver(broadcastPracticeCMDReceiver, intentFilter);
values.put(ICDatabaseHelper.sKey, cmdMap.get(cmd));
values.put(ICDatabaseHelper.sValue, data);
resolver.insert(Uri.parse(ICGlobalSettingsProvider.SETTINGS), values);
-
if (data.equals("1")) {
Util.setSystemProperties("persist.sys.whitelist.enable", "true");
} else {