update:2020.05.26

fix:
add:禁止应用升级功能
This commit is contained in:
2020-05-26 17:23:25 +08:00
parent 8976698729
commit a1b5f7e510
4 changed files with 65 additions and 5 deletions

View File

@@ -83,6 +83,8 @@ public class MyJPushReceiver extends BroadcastReceiver {
private final String APP_WEBSITE = "16";//app内网页管控
private final String DISABLE_APPUPDATE = "17";//禁止app升级
private Context mContext;
@@ -557,7 +559,24 @@ public class MyJPushReceiver extends BroadcastReceiver {
case APP_WEBSITE:
setAPPinsideWebsite(extras);
break;
case DISABLE_APPUPDATE:
Log.e("fht", extras);
setDisableUpdateList(extras);
break;
}
}
private void setDisableUpdateList(String s) {
try {
JSONObject jsonObject = new JSONObject(s);
String ban = jsonObject.getString("ban");
String not = jsonObject.getString("not");
String[] banList = ban.split(",");
String[] notList = not.split(",");
boolean b = Utils.writeDisableUpdateList(mContext, banList, notList);
} catch (JSONException e) {
e.printStackTrace();
}
}