diff --git a/app/build.gradle b/app/build.gradle index f0c94bf..9566ddd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,11 +9,11 @@ def releaseTime() { } android { - compileSdkVersion 29 + compileSdkVersion 30 defaultConfig { applicationId "com.jiaoguanyi.appstore" minSdkVersion 20 - targetSdkVersion 29 + targetSdkVersion 30 // versionCode 105 // versionName "3.1.0"//测试jiaoguanyi.cn @@ -89,8 +89,9 @@ android { } newl { flavorDimensions "default" - versionCode 161 - versionName "1.1.6" + versionCode 157 +// versionCode 1028 + versionName "1.1.7" /*********************************极光推送************************************/ manifestPlaceholders = [ JPUSH_PKGNAME: "com.jiaoguanyi.appstore", diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 86f93ee..1b5acc3 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -4,6 +4,7 @@ package="com.mjsheng.myappstore" android:sharedUserId="android.uid.system"> + @@ -19,6 +20,7 @@ + iConnMgrClass = Class.forName(iConnMgr.getClass().getName()); +// +//// if(isEnable){ +//// Method startTethering = iConnMgrClass.getMethod("startTethering", int.class, ResultReceiver.class, boolean.class,String.class); +//// startTethering.invoke(iConnMgr, 0, null, true,context.getPackageName()); +//// }else{ +// Method startTethering = iConnMgrClass.getMethod("stopTethering", int.class, String.class); +// startTethering.invoke(iConnMgr, 0, getPackageName()); +//// } +// +// } catch (NoSuchFieldException e) { +// e.printStackTrace(); +// } catch (NoSuchMethodException e) { +// e.printStackTrace(); +// } catch (IllegalAccessException e) { +// e.printStackTrace(); +// } catch (InvocationTargetException e) { +// e.printStackTrace(); +// } catch (ClassNotFoundException e) { +// e.printStackTrace(); +// } + + int setting_hotspot = changeNum(data.optInt("setting_hotspot")); + if (setting_hotspot == 1) { + Intent intent = new Intent(); + intent.setAction("qch_hotspot_close"); + intent.setPackage("com.android.settings"); + sendStickyBroadcast(intent); + } + boolean qch_hotspot_forbid_on = Settings.System.putInt(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); 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 754797a..111ccab 100644 --- a/app/src/main/java/com/mjsheng/myappstore/receiver/MyJPushReceiver.java +++ b/app/src/main/java/com/mjsheng/myappstore/receiver/MyJPushReceiver.java @@ -393,6 +393,12 @@ public class MyJPushReceiver extends BroadcastReceiver { } int setting_hotspot = changeNum(data.optInt("setting_hotspot"));//热点 + if (setting_hotspot == 1) { + Intent intent = new Intent(); + intent.setAction("qch_hotspot_close"); + intent.setPackage("com.android.settings"); + this.mContext.sendStickyBroadcast(intent); + } 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); 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 d69b755..b2ca152 100644 --- a/app/src/main/java/com/mjsheng/myappstore/server/InitJpushServer.java +++ b/app/src/main/java/com/mjsheng/myappstore/server/InitJpushServer.java @@ -1003,6 +1003,12 @@ public class InitJpushServer extends Service { } int setting_hotspot = changeNum(data.optInt("setting_hotspot"));//热点 + if (setting_hotspot == 1) { + Intent intent = new Intent(); + intent.setAction("qch_hotspot_close"); + intent.setPackage("com.android.settings"); + this.sendStickyBroadcast(intent); + } 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);