From: snickersun Date: Fri, 7 Aug 2020 12:20:55 +0000 (+0800) Subject: 添加中英文区别。 X-Git-Url: http://git.snicker.com.cn/sitemap.xml?a=commitdiff_plain;h=b37f2b76229159e6329133f4b41ad2059fb0ddd6;p=protocol_srv.git 添加中英文区别。 修复 SOS可能关闭不了GPS的问题。 --- diff --git a/app/src/main/java/com/enqualcomm/support/Config.java b/app/src/main/java/com/enqualcomm/support/Config.java index 383bd688..59e34866 100644 --- a/app/src/main/java/com/enqualcomm/support/Config.java +++ b/app/src/main/java/com/enqualcomm/support/Config.java @@ -217,9 +217,12 @@ public class Config { // } public static void loadModCycleSettings(Runtime runtime){ + ICLogger.i("current Cycles PPG "+ runtime.getPpgTestCycle()+" , LocationCycle "+runtime.getLocationInstance().getLocation_cycle()+" LocationMode "+runtime.getLocationInstance().getWorkingMod()); runtime.setPpgTestCycle(Config.getPPGTestCycle(runtime.getContextProxy().context)); runtime.getLocationInstance().setLocation_cycle(Config.getLocationCycle(runtime.getContextProxy().context)); runtime.getLocationInstance().setWorkingMod(Config.getLocationMode(runtime.getContextProxy().context)); + ICLogger.i("current Cycles PPG "+ runtime.getPpgTestCycle()+" , LocationCycle "+runtime.getLocationInstance().getLocation_cycle()+" LocationMode "+runtime.getLocationInstance().getWorkingMod()); + } public static void loadHearBeatSetting(Runtime runtime){ @@ -299,6 +302,7 @@ public class Config { } public static void setLocationMode(Context context,int mode){ + ICLogger.i("setLocationMode "+mode); SharPreferenceUtil.setPrefInt(context,KeyLocationMode,mode); } diff --git a/app/src/main/java/com/enqualcomm/support/CoreService.java b/app/src/main/java/com/enqualcomm/support/CoreService.java index 9cb2fd41..249f2662 100644 --- a/app/src/main/java/com/enqualcomm/support/CoreService.java +++ b/app/src/main/java/com/enqualcomm/support/CoreService.java @@ -921,6 +921,7 @@ public class CoreService extends Service { } else if (ACTION_SEND_EMEGENCY_LOCATION_STOP.equals(paramIntent.getAction())) { //stop Emegency location Stop Config.loadModCycleSettings(runtime); //回复之前的 工作模式即可 + LocationClient.setForceLocation(1); setLocationAlarm(runtime.getLocationInstance().getWorkingMod());//同时重置alarm并触发定位 }else if(ACTION_CHECK_ANTIOFF_EVENT.equals(paramIntent.getAction())){ diff --git a/app/src/main/java/com/enqualcomm/support/utils/SharPreferenceUtil.java b/app/src/main/java/com/enqualcomm/support/utils/SharPreferenceUtil.java index 93f4f20b..07e610c7 100644 --- a/app/src/main/java/com/enqualcomm/support/utils/SharPreferenceUtil.java +++ b/app/src/main/java/com/enqualcomm/support/utils/SharPreferenceUtil.java @@ -2,6 +2,7 @@ package com.enqualcomm.support.utils; import android.content.Context; import android.content.SharedPreferences; +import android.content.pm.PackageManager; import android.preference.PreferenceManager; public class SharPreferenceUtil { @@ -73,4 +74,61 @@ public class SharPreferenceUtil { SharedPreferences sp=context.getSharedPreferences("icprotocolconfig",Context.MODE_WORLD_READABLE); return sp.getInt(key, value); } + +//// 其他应用读取写入访问的方法 +// public static String getPrefStringPublic(Context context, String key, String value) { +// +// String PREFERENCE_PACKAGE="com.enqualcomm.support"; +// Context c; +// try { +// c = context.createPackageContext(PREFERENCE_PACKAGE, Context.CONTEXT_IGNORE_SECURITY); +// SharedPreferences sp=c.getSharedPreferences("icprotocolconfig",Context.MODE_WORLD_READABLE); +// return sp.getString(key, value); +// } catch (PackageManager.NameNotFoundException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } +// return value; +// } +// public static void setPrefStringPublic(Context context, String key, String value) { +// String PREFERENCE_PACKAGE="com.enqualcomm.support"; +// Context c; +// try { +// c = context.createPackageContext(PREFERENCE_PACKAGE, Context.CONTEXT_IGNORE_SECURITY); +// SharedPreferences sp=c.getSharedPreferences("icprotocolconfig",Context.MODE_WORLD_WRITEABLE); +// sp.edit().putString(key, value).commit(); +// } catch (PackageManager.NameNotFoundException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } +// +// } +// public static void setPrefIntPublic(Context context, String key, int value) { +// String PREFERENCE_PACKAGE="com.enqualcomm.support"; +// Context c; +// try { +// c = context.createPackageContext(PREFERENCE_PACKAGE, Context.CONTEXT_IGNORE_SECURITY); +// SharedPreferences sp=c.getSharedPreferences("icprotocolconfig",Context.MODE_WORLD_WRITEABLE); +// sp.edit().putInt(key, value).commit(); +// } catch (PackageManager.NameNotFoundException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } +// +// } +// public static int getPrefIntPublic(Context context, String key, int value) { +// String PREFERENCE_PACKAGE="com.enqualcomm.support"; +// Context c; +// try { +// c = context.createPackageContext(PREFERENCE_PACKAGE, Context.CONTEXT_IGNORE_SECURITY); +// SharedPreferences sp=c.getSharedPreferences("icprotocolconfig",Context.MODE_WORLD_READABLE); +// return sp.getInt(key, value); +// } catch (PackageManager.NameNotFoundException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } +// +// return value; +// } + } diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml new file mode 100644 index 00000000..b70cc736 --- /dev/null +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -0,0 +1,128 @@ + + ICProtocolServer + 抱歉,程序出错将推出! + 很抱歉,程序出现异常,即将退出 + + "%1$没有安装!" + + 取消 + + 推送服务 + + 家庭群组 + 所有人 + + 短信提醒 + 您有新短消息! + 的未接来电 + + + 您有 + + 来电提醒 + + 查找设备! + + successRateAnalytics + + Cancel + + Favorite + + A Favorites icon will be created on the home screen. You can touch the icon to view all your favorite notifications. + + OK + + Delete + + Delete notifications + + A maximum of 1000 favorite notifications can be saved. Delete some notifications before you can add new ones. Go to your favorite notifications list? + + Go + + Note + + Forward + + Back + + Loading... Please wait. + + Favorites + + Favorite notifications + + No favorite notifications + + Refresh + + Store messages + + Rich media + + Select all + + Deselect all + + 未命名 + + 电话 + + 现在 + + 个未接电话 + + 分钟前 + + 微聊 + + 发来新消息 + + [表情] + + [图片] + + [视频] + + [语音] + + 确定 + + 您暂未激活该功能哦,快去APP上激活吧~ + + spring_ding_dong.mp3 + + 搜索 + + 微聊消息 + + 正在发起视频通话... + + 统计 + + 999+ + + \"微聊消息:\" + \"您有新微聊消息,请注意查收!\" + + 主题 + + The call has been disconnected because the watch is overheated + + Dear, to protect your eyes, the call will be disconnected + + 宝贝 + + 来自 : + + 的微聊消息 + + 电量低,请充电 + 锁定成功 + 恭喜您解矫成功 + 非法解锁 + 您已越界,请尽快返回 + 腕带已脱落 + 腕带已佩戴 + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f6fc2d0d..71cce27a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,27 +1,27 @@ ICProtocolServer Sorry, the program is abnormal and will quit! - 很抱歉,程序出现异常,即将退出 + Sorry, Program Error, will quit! "%1$s hasn't been installed" - 取消 + Cancel Push Service - 家庭群组 - 所有人 + FamilyGroup + GroupAll - 短信提醒 - 您有新短消息! - 的未接来电 + SMS Message + You have new Message! + \'s not answered call! - 您有 + You have - 来电提醒 + Missed Call - 查找设备! + Find Device! successRateAnalytics @@ -65,19 +65,19 @@ Deselect all - 未命名 + no Name - 电话 + PhoneNum - 现在 + Now - 个未接电话 + Missed calls! - 分钟前 + minutes before - 微聊 + Chat - 发来新消息 + new Message! [表情] @@ -87,7 +87,7 @@ [语音] - 确定 + OK 您暂未激活该功能哦,快去APP上激活吧~ @@ -95,7 +95,7 @@ Search - 微聊消息 + Chat Message 正在发起视频通话... @@ -113,7 +113,16 @@ 宝贝 - 来自 : + From : + + Chat message! + + Low battery, please charge! + Locking success! + Congratulations on your successful unbind! + Illegal to unlock! + You have crossed the line, please return as soon as possible! + Wristband has fallen off + Wristband has been wear - 的微聊消息