update:2020.05.26
fix: add:禁止应用升级功能
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user