-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":979,"versionName":"2110201800","enabled":true,"outputFile":"ICSer_V979_2110201800_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V979_2110201800_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":981,"versionName":"2110251558","enabled":true,"outputFile":"ICSer_V981_2110251558_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V981_2110251558_release.apk","properties":{}}]
\ No newline at end of file
private void trigger_SOS_Call() {
try {
- Intent intent = new Intent("com.eqc.shutdown_sos");
- intent.putExtra("type", 1);
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- this.startActivity(intent);
+ //查询有没有IC的sos,如果有就用IC的SOS
+ Intent icIntent = getPackageManager().getLaunchIntentForPackage("com.ic.sos");
+ if (icIntent != null) {
+ icIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ startActivity(icIntent);
+ } else {
+ Intent intent = new Intent("com.eqc.shutdown_sos");
+ intent.putExtra("type", 1);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ this.startActivity(intent);
+ }
} catch (Exception e) {
e.printStackTrace();
}
coreService.getFZDWeatherInfo();
coreService.sendAntiStatus();
}, 30 * 1000);
-
}
public void onReceive(StringMessage param1StringMessage) {
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
-import android.media.AudioManager;
import android.net.Uri;
import android.os.Environment;
import android.os.Handler;
import com.enqualcomm.support.utils.Connection;
import com.enqualcomm.support.utils.ICAudioManager;
import com.enqualcomm.support.utils.ICLogger;
-import com.enqualcomm.support.utils.ProfileManager;
import com.enqualcomm.support.utils.SharePreferenceUtil;
import com.enqualcomm.support.utils.TemperatureUtil;
import com.enqualcomm.support.utils.TimeUtil;
if (split.length == 4) {
String indexId = split[2];
String value = split[3];
- Context context = mRuntime.getContextProxy().context;
- AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
- //更新设置
- if ("1".equals(value)) {
- ProfileManager.silentAll(context, audioManager);
- } else {
- ProfileManager.restoreSilent(context, audioManager);
- }
//修改数据库
updateSettingValue("key_silent", value);
//返回消息
private void updateSettingValue(String key, String value) {
ContentResolver resolver = mRuntime.getContextProxy().getResolver();
+ //先查询,如果已经是当前值了,就不要去更新了
+ Uri parse = Uri.parse(ICGlobalSettingsProvider.SETTINGS);
+ Cursor query = resolver.query(parse, new String[]{"s_value"}, "s_key=?", new String[]{key}, null);
+ if (query != null) {
+ if (query.moveToNext()) {
+ String string = query.getString(0);
+ if (value.equals(string)) {
+ ICLogger.d("值一样,不做修改.");
+ return;
+ }
+ query.close();
+ }
+ }
ContentValues values = new ContentValues();
values.put(ICDatabaseHelper.sKey, key);
//把值保存到数据库中,相机会就监听数据库值的变化,做出响应
values.put(ICDatabaseHelper.sValue, value);
- resolver.insert(Uri.parse(ICGlobalSettingsProvider.SETTINGS), values);
+ resolver.insert(parse, values);
}
/**