From 05b6974d06aef9637adc9f13637596c5e33893f4 Mon Sep 17 00:00:00 2001 From: Administrator <981964879@qq.com> Date: Thu, 5 Nov 2020 16:33:19 +0800 Subject: [PATCH] =?UTF-8?q?version:=20update:2020.11.5=20fix:=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=83=AD=E7=82=B9=E5=BC=80=E5=85=B3=EF=BC=8C=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E6=91=84=E5=83=8F=E5=A4=B4=E9=9A=90=E8=97=8F=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E7=AE=A1=E6=8E=A7=20add:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 13 +++++++------ .../java/com/mjsheng/myappstore/MyApplication.java | 8 +++++++- .../mjsheng/myappstore/activity/MainActivity.java | 8 +++++++- .../com/mjsheng/myappstore/network/Network.java | 1 + .../mjsheng/myappstore/receiver/BootReceiver.java | 1 + .../myappstore/receiver/MyJPushReceiver.java | 8 +++++++- .../mjsheng/myappstore/server/InitJpushServer.java | 7 ++++++- .../java/com/mjsheng/myappstore/utils/ApkUtils.java | 2 +- 8 files changed, 37 insertions(+), 11 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a422417..f0c94bf 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -38,8 +38,8 @@ android { productFlavors { official { flavorDimensions "default" - versionCode 1025 - versionName "2.0.2.5"// 正式jiaoguanyi.com 双数正式 单数测试 + versionCode 1026 + versionName "2.0.2.6"// 正式jiaoguanyi.com 双数正式 单数测试 /*********************************极光推送************************************/ manifestPlaceholders = [ JPUSH_PKGNAME: "com.jiaoguanyi.appstore", @@ -55,8 +55,9 @@ android { beta { flavorDimensions "default" - versionCode 108 - versionName "3.1.3"//测试jiaoguanyi.cn + versionCode 109 +// versionCode 160//出厂版本太高 + versionName "3.1.4"//测试jiaoguanyi.cn /*********************************极光推送************************************/ manifestPlaceholders = [ JPUSH_PKGNAME: "com.jiaoguanyi.appstore", @@ -88,8 +89,8 @@ android { } newl { flavorDimensions "default" - versionCode 159 - versionName "1.1.4" + versionCode 161 + versionName "1.1.6" /*********************************极光推送************************************/ manifestPlaceholders = [ JPUSH_PKGNAME: "com.jiaoguanyi.appstore", diff --git a/app/src/main/java/com/mjsheng/myappstore/MyApplication.java b/app/src/main/java/com/mjsheng/myappstore/MyApplication.java index e9ab40b..24b4056 100644 --- a/app/src/main/java/com/mjsheng/myappstore/MyApplication.java +++ b/app/src/main/java/com/mjsheng/myappstore/MyApplication.java @@ -113,7 +113,7 @@ public class MyApplication extends MultiDexApplication { private SimpleDateFormat mDateFormat = null; private static List activityList = new LinkedList(); private Handler mHandler; - private static AMapLocationClient locationClient = null; + public static AMapLocationClient locationClient = null; public static Context getAppContext() { @@ -230,6 +230,8 @@ public class MyApplication extends MultiDexApplication { sb.append("定位失败" + "\n"); SPUtils.put(context, "AmapError", aMapLocation.getErrorInfo()); } + Log.e("AmapAddress", (String) SPUtils.get(context, "AmapAddress", "")); + Log.e("AmapError", (String) SPUtils.get(context, "AmapError", "")); Log.e("addr", sb.toString()); } }); @@ -350,6 +352,10 @@ public class MyApplication extends MultiDexApplication { Log.e("fht", "receiver action:" + action); if (action.equals(Intent.ACTION_SCREEN_ON)) { long time = System.currentTimeMillis(); + if (null != locationClient) { + locationClient.stopLocation(); + locationClient.startLocation(); + } getLockState("2", String.valueOf(time)); } else if (action.equals(Intent.ACTION_USER_PRESENT)) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { diff --git a/app/src/main/java/com/mjsheng/myappstore/activity/MainActivity.java b/app/src/main/java/com/mjsheng/myappstore/activity/MainActivity.java index c53ced4..c2f48a2 100644 --- a/app/src/main/java/com/mjsheng/myappstore/activity/MainActivity.java +++ b/app/src/main/java/com/mjsheng/myappstore/activity/MainActivity.java @@ -219,6 +219,7 @@ public class MainActivity extends AppCompatActivity implements AMapLocationListe } } + public void setAlias() { TagAliasBean tagAliasBean = new TagAliasBean(); tagAliasBean.action = ACTION_SET; @@ -1720,6 +1721,11 @@ public class MainActivity extends AppCompatActivity implements AMapLocationListe } + int setting_hotspot = changeNum(data.optInt("setting_hotspot"));//热点 + boolean qch_hotspot_forbid_on = Settings.System.putInt(this.mContext.getContentResolver(), "qch_hotspot_forbid_on", setting_hotspot);//写入系统数据库 + Log.e("SystemSetting", "qch_hotspot_forbid_on---------" + setting_hotspot); + Log.e("SystemSetting", "qch_hotspot_forbid_on---------" + qch_hotspot_forbid_on); + //系统导航条显示开关 int setting_navigation = changeNum(data.optInt("setting_navigation")); boolean qch_hide_navigationBar = Settings.System.putInt(getContentResolver(), "qch_hide_NavigationBar", setting_navigation); @@ -1761,7 +1767,7 @@ public class MainActivity extends AppCompatActivity implements AMapLocationListe //摄像头开关 int setting_camera = changeNum(data.optInt("setting_camera")); Settings.System.putInt(MainActivity.this.getContentResolver(), "qch_app_camera", setting_camera); - ApkUtils.hideSystemSettingAPP(MainActivity.this, "com.mediatek.camera"); +// ApkUtils.hideSystemSettingAPP(MainActivity.this, "com.mediatek.camera"); Log.e("SystemSetting", "setting_camera---------" + setting_camera); String cameraStatus = ""; switch (setting_camera) { diff --git a/app/src/main/java/com/mjsheng/myappstore/network/Network.java b/app/src/main/java/com/mjsheng/myappstore/network/Network.java index 3899d73..3f981c9 100644 --- a/app/src/main/java/com/mjsheng/myappstore/network/Network.java +++ b/app/src/main/java/com/mjsheng/myappstore/network/Network.java @@ -68,6 +68,7 @@ public class Network { private static GetLockState getLockState; private static UpdateDeviceInfo updateDeviceInfo; private static GetBatchApi getBatchApi; + private static final long cacheSize = 1024 * 1024 * 20;// 缓存文件最大限制大小20M private static String cacheDirectory = Environment.getExternalStorageDirectory() + "/okttpcaches"; // 设置缓存文件路径 private static Cache cache = new Cache(new File(cacheDirectory), cacheSize); // diff --git a/app/src/main/java/com/mjsheng/myappstore/receiver/BootReceiver.java b/app/src/main/java/com/mjsheng/myappstore/receiver/BootReceiver.java index d663aff..c39872f 100644 --- a/app/src/main/java/com/mjsheng/myappstore/receiver/BootReceiver.java +++ b/app/src/main/java/com/mjsheng/myappstore/receiver/BootReceiver.java @@ -59,6 +59,7 @@ public class BootReceiver extends BroadcastReceiver { context.startService(intent); context.startService(new Intent(context, StepService.class)); context.startService(new Intent(context, GuardService.class)); + context.startService(new Intent(context, InitJpushServer.class)); context.startService(new Intent(context, MyDownloadService.class)); } } diff --git a/app/src/main/java/com/mjsheng/myappstore/receiver/MyJPushReceiver.java b/app/src/main/java/com/mjsheng/myappstore/receiver/MyJPushReceiver.java index b2c6036..754797a 100644 --- a/app/src/main/java/com/mjsheng/myappstore/receiver/MyJPushReceiver.java +++ b/app/src/main/java/com/mjsheng/myappstore/receiver/MyJPushReceiver.java @@ -392,6 +392,12 @@ public class MyJPushReceiver extends BroadcastReceiver { } + int setting_hotspot = changeNum(data.optInt("setting_hotspot"));//热点 + boolean qch_hotspot_forbid_on = Settings.System.putInt(this.mContext.getContentResolver(), "qch_hotspot_forbid_on", setting_hotspot);//写入系统数据库 + Log.e("SystemSetting", "qch_hotspot_forbid_on---------" + setting_hotspot); + Log.e("SystemSetting", "qch_hotspot_forbid_on---------" + qch_hotspot_forbid_on); + + //系统导航条显示开关 int setting_navigation = changeNum(data.optInt("setting_navigation")); boolean qch_hide_navigationBar = Settings.System.putInt(mContext.getContentResolver(), "qch_hide_NavigationBar", setting_navigation); @@ -434,7 +440,7 @@ public class MyJPushReceiver extends BroadcastReceiver { //摄像头开关 int setting_camera = changeNum(data.optInt("setting_camera")); Settings.System.putInt(this.mContext.getContentResolver(), "qch_app_camera", setting_camera); - ApkUtils.hideSystemSettingAPP(this.mContext, "com.mediatek.camera"); +// ApkUtils.hideSystemSettingAPP(this.mContext, "com.mediatek.camera"); Log.e("SystemSetting", "setting_camera---------" + setting_camera); String cameraStatus = ""; switch (setting_camera) { diff --git a/app/src/main/java/com/mjsheng/myappstore/server/InitJpushServer.java b/app/src/main/java/com/mjsheng/myappstore/server/InitJpushServer.java index b09a732..d69b755 100644 --- a/app/src/main/java/com/mjsheng/myappstore/server/InitJpushServer.java +++ b/app/src/main/java/com/mjsheng/myappstore/server/InitJpushServer.java @@ -1002,6 +1002,11 @@ public class InitJpushServer extends Service { } + int setting_hotspot = changeNum(data.optInt("setting_hotspot"));//热点 + boolean qch_hotspot_forbid_on = Settings.System.putInt(this.getContentResolver(), "qch_hotspot_forbid_on", setting_hotspot);//写入系统数据库 + Log.e("SystemSetting", "qch_hotspot_forbid_on---------" + setting_hotspot); + Log.e("SystemSetting", "qch_hotspot_forbid_on---------" + qch_hotspot_forbid_on); + //系统导航条显示开关 int setting_navigation = changeNum(data.optInt("setting_navigation")); boolean qch_hide_navigationBar = Settings.System.putInt(InitJpushServer.this.getContentResolver(), "qch_hide_NavigationBar", setting_navigation); @@ -1044,7 +1049,7 @@ public class InitJpushServer extends Service { //摄像头开关 int setting_camera = changeNum(data.optInt("setting_camera")); Settings.System.putInt(InitJpushServer.this.getContentResolver(), "qch_app_camera", setting_camera); - ApkUtils.hideSystemSettingAPP(InitJpushServer.this, "com.mediatek.camera"); +// ApkUtils.hideSystemSettingAPP(InitJpushServer.this, "com.mediatek.camera"); Log.e("SystemSetting", "setting_camera---------" + setting_camera); String cameraStatus = ""; switch (setting_camera) { diff --git a/app/src/main/java/com/mjsheng/myappstore/utils/ApkUtils.java b/app/src/main/java/com/mjsheng/myappstore/utils/ApkUtils.java index 52f356a..b7565c9 100644 --- a/app/src/main/java/com/mjsheng/myappstore/utils/ApkUtils.java +++ b/app/src/main/java/com/mjsheng/myappstore/utils/ApkUtils.java @@ -663,7 +663,7 @@ public class ApkUtils { try { if (pkage.equalsIgnoreCase("com.mediatek.camera")) { if (Settings.System.getInt(context.getContentResolver(), "qch_app_camera") == 1) { - hide = 1; + hide = 0;//管控摄像头隐藏图标有问题,先暂时不隐藏 } } else if (pkage.equalsIgnoreCase("com.android.deskclock")) { if (Settings.System.getInt(context.getContentResolver(), "qch_app_deskclock") == 1) {