update:2020.5.14
fix:兼容Android10.0 http联网问题,静默安装问题 add:
This commit is contained in:
@@ -133,7 +133,7 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
break;
|
||||
|
||||
}
|
||||
Intent usbIntent = new Intent(usbStatus);
|
||||
Intent usbIntent = new Intent(usbStatus).setPackage("com.android.settings");
|
||||
mContext.sendBroadcast(usbIntent);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
break;
|
||||
|
||||
}
|
||||
Intent navIntent = new Intent(navigationStatus);
|
||||
Intent navIntent = new Intent(navigationStatus).setPackage("com.android.systemui");
|
||||
mContext.sendBroadcast(navIntent);
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
statusbarStatus = "qch_hide_statusBar";
|
||||
break;
|
||||
}
|
||||
Intent statusIntent = new Intent(statusbarStatus);
|
||||
Intent statusIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
|
||||
mContext.sendBroadcast(statusIntent);
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
cameraStatus = "qch_camera_forbid";
|
||||
break;
|
||||
}
|
||||
Intent cameraIntent = new Intent(cameraStatus);
|
||||
Intent cameraIntent = new Intent(cameraStatus).setPackage("com.android.settings");
|
||||
mContext.sendBroadcast(cameraIntent);
|
||||
|
||||
//影音管控开关
|
||||
@@ -518,7 +518,7 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
break;
|
||||
case MSG_RESET:
|
||||
if (getBatteryLevel() >= CommonDatas.MIN_POWER) {
|
||||
mContext.sendBroadcast(new Intent("android.intent.action.MASTER_CLEAR"));
|
||||
mContext.sendBroadcast(new Intent("android.intent.action.MASTER_CLEAR").setPackage("com.android.settings"));
|
||||
} else {
|
||||
MySQLData.SetBooleanData(mContext, CommonDatas.IS_RESET, true);
|
||||
}
|
||||
@@ -574,7 +574,7 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
// "com.handsgo.jiakao.android,com.chinessjunqi.nb,com.cktiku.gushiwenbibei,com.yangcong345.android.phone"}
|
||||
private void settingCamera(String s) {
|
||||
if (TextUtils.isEmpty(s)) {
|
||||
Intent intent = new Intent("qch_camera_forbid");
|
||||
Intent intent = new Intent("qch_camera_forbid").setPackage("com.android.settings");
|
||||
intent.putExtra("camera_package_name", "close");
|
||||
this.mContext.sendBroadcast(intent);
|
||||
Log.e("mjsheng", "settingNetControl extras is null");
|
||||
@@ -587,11 +587,11 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
Log.e("mymjsheng", "ban::" + s1);
|
||||
// Log.e("mymjsheng", "not::" + str);
|
||||
if (s1.equals("0")) {
|
||||
Intent intent2 = new Intent("qch_camera_forbid");
|
||||
Intent intent2 = new Intent("qch_camera_forbid").setPackage("com.android.settings");
|
||||
// intent2.putExtra("camera_package_name", s1);
|
||||
this.mContext.sendBroadcast(intent2);
|
||||
} else {
|
||||
Intent intent1 = new Intent("qch_camera_open");
|
||||
Intent intent1 = new Intent("qch_camera_open").setPackage("com.android.settings");
|
||||
// intent1.putExtra("camera_package_name", str);
|
||||
this.mContext.sendBroadcast(intent1);
|
||||
}
|
||||
@@ -751,32 +751,6 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
// }
|
||||
}
|
||||
|
||||
private class BroadcastThread extends Thread {
|
||||
String[] packagename;
|
||||
String action;
|
||||
|
||||
public BroadcastThread(String a, String[] s) {
|
||||
super();
|
||||
this.packagename = s;
|
||||
this.action = a;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
super.run();
|
||||
for (String name : packagename) {
|
||||
Intent disIntent = new Intent(action);
|
||||
disIntent.putExtra("package_name", name);
|
||||
Log.e("mymjsheng", "package_name::" + name);
|
||||
mContext.sendBroadcast(disIntent);
|
||||
try {
|
||||
sleep(5000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//应用id管控
|
||||
@@ -854,7 +828,7 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
Log.e("SystemSetting", "qch_unlock_ipad---------" + i);
|
||||
|
||||
if (getBatteryLevel() >= CommonDatas.MIN_POWER) {
|
||||
mContext.sendBroadcast(new Intent("android.intent.action.MASTER_CLEAR"));
|
||||
mContext.sendBroadcast(new Intent("android.intent.action.MASTER_CLEAR").setPackage("com.android.settings"));
|
||||
} else {
|
||||
MySQLData.SetBooleanData(mContext, CommonDatas.IS_RESET, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user