1.4.1217
bugfixes:优化命名
This commit is contained in:
@@ -47,7 +47,7 @@ import com.aoleyun.sn.utils.CacheUtils;
|
||||
import com.aoleyun.sn.utils.Camera2BackgroundUtil;
|
||||
import com.aoleyun.sn.utils.CmdUtil;
|
||||
import com.aoleyun.sn.utils.ForegroundAppUtil;
|
||||
import com.aoleyun.sn.utils.JGYUtils;
|
||||
import com.aoleyun.sn.utils.JgyUtils;
|
||||
import com.aoleyun.sn.utils.MySQLData;
|
||||
import com.aoleyun.sn.utils.SPUtils;
|
||||
import com.aoleyun.sn.utils.ServiceAliveUtils;
|
||||
@@ -270,8 +270,8 @@ public class PushManager {
|
||||
case MSG_SETTING:
|
||||
Toaster.debugShow("收到管控:系统设置");
|
||||
if (!TextUtils.isEmpty(extras)) {
|
||||
JGYUtils.getInstance().SettingSysData(extras);
|
||||
// JGYUtils.getInstance().removeAllTask();
|
||||
JgyUtils.getInstance().SettingSysData(extras);
|
||||
// JgyUtils.getInstance().removeAllTask();
|
||||
}
|
||||
break;
|
||||
case MSG_BROWSER:
|
||||
@@ -292,12 +292,12 @@ public class PushManager {
|
||||
break;
|
||||
case MSG_RESET:
|
||||
Toaster.debugShow("收到管控:设备重置");
|
||||
JGYUtils.getInstance().cleanAoleLauncher3Cache();
|
||||
JgyUtils.getInstance().cleanAoleLauncher3Cache();
|
||||
Utils.doMasterClear(mContext);
|
||||
Aria.download(this).removeAllTask(true);
|
||||
mMMKV.clearAll();
|
||||
JGYUtils.getInstance().cleanAoleAppCache();
|
||||
JGYUtils.getInstance().wakeUpAoleyunAPP();
|
||||
JgyUtils.getInstance().cleanAoleAppCache();
|
||||
JgyUtils.getInstance().wakeUpAoleyunAPP();
|
||||
NetInterfaceManager.getInstance().setPushTags();
|
||||
|
||||
sendRefreshBroadcast(mContext);
|
||||
@@ -336,7 +336,7 @@ public class PushManager {
|
||||
break;
|
||||
case GET_FORCEDOWNLOADURL:
|
||||
Toaster.debugShow("收到管控:应用强制安装");
|
||||
File file = new File(JGYUtils.getInstance().getDownLoadPath());
|
||||
File file = new File(JgyUtils.getInstance().getDownLoadPath());
|
||||
if (!file.exists()) {
|
||||
file.mkdirs();
|
||||
}
|
||||
@@ -507,7 +507,7 @@ public class PushManager {
|
||||
Toaster.debugShow("收到管控:停止应用");
|
||||
JsonObject killJSONObject = GsonUtils.getJsonObject(extras);
|
||||
String packages = killJSONObject.get("package_name").getAsString();
|
||||
JGYUtils.getInstance().killBackgroundProcesses(packages);
|
||||
JgyUtils.getInstance().killBackgroundProcesses(packages);
|
||||
break;
|
||||
case TIME_CONTROL:
|
||||
Toaster.debugShow("收到管控:使用时间管控");
|
||||
@@ -545,7 +545,7 @@ public class PushManager {
|
||||
case EBAG_CODE:
|
||||
Toaster.debugShow("收到管控:电子书包激活码");
|
||||
setEbagCode(extras);
|
||||
JGYUtils.getInstance().killBackgroundProcesses("com.jxw.launcher");
|
||||
JgyUtils.getInstance().killBackgroundProcesses("com.jxw.launcher");
|
||||
break;
|
||||
case UPDATE_WHITELIST:
|
||||
Toaster.debugShow("收到管控:更新白名单");
|
||||
@@ -555,7 +555,7 @@ public class PushManager {
|
||||
Toaster.debugShow("收到管控:更换批次不恢复出厂设置");
|
||||
NetInterfaceManager.getInstance().setPushTags();
|
||||
Aria.download(this).removeAllTask(true);
|
||||
JGYUtils.getInstance().cleanAoleAppCache();
|
||||
JgyUtils.getInstance().cleanAoleAppCache();
|
||||
try {
|
||||
new CacheUtils().cleanApplicationUserData(mContext, "com.android.browser");
|
||||
} catch (Exception e) {
|
||||
@@ -568,7 +568,7 @@ public class PushManager {
|
||||
NetInterfaceManager.getInstance().getWiFiPasswd();
|
||||
break;
|
||||
case DEVICES_SHUTDOWN_NOW:
|
||||
JGYUtils.getInstance().shutdown();
|
||||
JgyUtils.getInstance().shutdown();
|
||||
break;
|
||||
case DEVICES_POWEROFF:
|
||||
NetInterfaceManager.getInstance().getPoweroffTime();
|
||||
@@ -580,7 +580,7 @@ public class PushManager {
|
||||
customOrder(extras);
|
||||
break;
|
||||
case CLEAN_MEMORY:
|
||||
JGYUtils.getInstance().cleanBackgroundMemory();
|
||||
JgyUtils.getInstance().cleanBackgroundMemory();
|
||||
break;
|
||||
case SN_LOG_SETTING:
|
||||
senSNLogFile(extras);
|
||||
@@ -689,7 +689,7 @@ public class PushManager {
|
||||
// intent.setComponent(componentName);
|
||||
// intent.setAction(CommonConfig.FOCUS_MODE_REFRESH_KEY);
|
||||
// mContext.sendBroadcast(intent);
|
||||
JGYUtils.getInstance().gotoLauncher();
|
||||
JgyUtils.getInstance().gotoLauncher();
|
||||
NetInterfaceManager.getInstance().getCloudLessonSettings();
|
||||
}
|
||||
|
||||
@@ -730,7 +730,7 @@ public class PushManager {
|
||||
String packages = jsonObject.get("package").getAsString();
|
||||
int is_open = jsonObject.get("is_open").getAsInt();
|
||||
if (is_open == 0) {
|
||||
JGYUtils.getInstance().killBackgroundProcesses(packages);
|
||||
JgyUtils.getInstance().killBackgroundProcesses(packages);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "disableApp: " + e.getMessage());
|
||||
@@ -757,7 +757,7 @@ public class PushManager {
|
||||
}
|
||||
|
||||
private void doDownloadAndInstall(String jsonString) {
|
||||
File file = new File(JGYUtils.getInstance().getDownLoadPath());
|
||||
File file = new File(JgyUtils.getInstance().getDownLoadPath());
|
||||
if (!file.exists()) {
|
||||
file.mkdirs();
|
||||
}
|
||||
@@ -907,7 +907,7 @@ public class PushManager {
|
||||
String allow = jSONObject.get("not").getAsString();
|
||||
HashSet<String> disallowApp = new HashSet<>(Arrays.asList(disallow.split(",")));
|
||||
HashSet<String> allowApp = new HashSet<>(Arrays.asList(allow.split(",")));
|
||||
JGYUtils.getInstance().setAppNetwork(disallowApp, allowApp);
|
||||
JgyUtils.getInstance().setAppNetwork(disallowApp, allowApp);
|
||||
}
|
||||
|
||||
private void settingPowerOn(String s) {
|
||||
@@ -974,8 +974,8 @@ public class PushManager {
|
||||
// JsonObject jSONObject = GsonUtils.getJsonObject(s);
|
||||
// long createTime = jSONObject.getLong("createTime");
|
||||
long createTime = System.currentTimeMillis() / 1000;
|
||||
PowerManager.WakeLock mWakeLock = JGYUtils.acquireWakeLock(mContext, 60 * 1000);
|
||||
JGYUtils.release(mWakeLock);
|
||||
PowerManager.WakeLock mWakeLock = JgyUtils.acquireWakeLock(mContext, 60 * 1000);
|
||||
JgyUtils.release(mWakeLock);
|
||||
if (createTime != 0) {
|
||||
Log.e("createTime", String.valueOf(createTime));
|
||||
Handler.getMain().postDelayed(new Runnable() {
|
||||
@@ -1115,27 +1115,27 @@ public class PushManager {
|
||||
if (type == 1) {
|
||||
String file_url = jsonObject.get("file_url").getAsString();
|
||||
String file_md5 = jsonObject.get("file_md5").getAsString();
|
||||
JGYUtils.getInstance().checkBootFile(file_url, file_md5);
|
||||
JgyUtils.getInstance().checkBootFile(file_url, file_md5);
|
||||
} else {
|
||||
JGYUtils.getInstance().removeBootanimation();
|
||||
JgyUtils.getInstance().removeBootanimation();
|
||||
}
|
||||
}
|
||||
|
||||
private void setDefalutApp(String extras) {
|
||||
if (TextUtils.isEmpty(extras)) {
|
||||
JGYUtils.getInstance().setDefaultDesktop("");
|
||||
JGYUtils.getInstance().openLauncher3();
|
||||
JgyUtils.getInstance().setDefaultDesktop("");
|
||||
JgyUtils.getInstance().openLauncher3();
|
||||
} else {
|
||||
JsonObject jsonObject = GsonUtils.getJsonObject(extras);
|
||||
JsonElement launcherElement = jsonObject.get("default_launcher");
|
||||
if (launcherElement.isJsonNull() || TextUtils.isEmpty(launcherElement.getAsString())) {
|
||||
JGYUtils.getInstance().setDefaultDesktop("");
|
||||
JgyUtils.getInstance().setDefaultDesktop("");
|
||||
mMMKV.encode(CommonConfig.DEFAULT_LAUNCHER_PACKAGE_NAME, "");
|
||||
JGYUtils.getInstance().openLauncher3();
|
||||
JgyUtils.getInstance().openLauncher3();
|
||||
} else {
|
||||
String default_launcher = launcherElement.getAsString();
|
||||
JGYUtils.getInstance().setDefaultDesktop(default_launcher);
|
||||
ComponentName cn = new ComponentName(default_launcher, JGYUtils.getInstance().getStartClassName(default_launcher));
|
||||
JgyUtils.getInstance().setDefaultDesktop(default_launcher);
|
||||
ComponentName cn = new ComponentName(default_launcher, JgyUtils.getInstance().getStartClassName(default_launcher));
|
||||
Intent intent = new Intent();
|
||||
intent.setComponent(cn);
|
||||
intent.addCategory(Intent.CATEGORY_LAUNCHER);
|
||||
@@ -1240,7 +1240,7 @@ public class PushManager {
|
||||
int is_developer = jsonObject.get("is_developer").getAsInt();
|
||||
Log.e(TAG + ":" + "getDeveloper", "onNext: " + is_developer);
|
||||
Log.e(TAG, "setDeveloperoptions: " + is_developer);
|
||||
JGYUtils.getInstance().setDeveloperOptions(is_developer);
|
||||
JgyUtils.getInstance().setDeveloperOptions(is_developer);
|
||||
}
|
||||
|
||||
private void GlobalUpdate(String jsonString) {
|
||||
@@ -1249,7 +1249,7 @@ public class PushManager {
|
||||
}
|
||||
JsonObject jsonObject = GsonUtils.getJsonObject(jsonString);
|
||||
String platform = jsonObject.get("platform").getAsString();
|
||||
if (JGYUtils.getInstance().isSamePlatform(platform)) {
|
||||
if (JgyUtils.getInstance().isSamePlatform(platform)) {
|
||||
checkAPPInstall(jsonObject);
|
||||
} else {
|
||||
Log.e(TAG, "GlobalUpdate: " + "应用与app平台不符合");
|
||||
@@ -1285,13 +1285,13 @@ public class PushManager {
|
||||
if (TextUtils.isEmpty(ebagCode)) {
|
||||
Log.e(TAG, "setEbagCode: " + "ebagCode is empty");
|
||||
SPUtils.put(mContext, "ebagCode", "");
|
||||
if (JGYUtils.getInstance().checkAppPlatform() != JGYUtils.YXPD1Platform) {
|
||||
if (JgyUtils.getInstance().checkAppPlatform() != JgyUtils.YXPD1Platform) {
|
||||
Settings.System.putString(mContext.getContentResolver(), CommonConfig.ACTIVATIONBEAN_CODE_KEY, "");
|
||||
Settings.Global.putInt(mContext.getContentResolver(), CommonConfig.UIUI_ACTIVATION_KEY, 0);
|
||||
}
|
||||
} else {
|
||||
SPUtils.put(mContext, "ebagCode", ebagCode);
|
||||
if (JGYUtils.getInstance().checkAppPlatform() != JGYUtils.YXPD1Platform) {
|
||||
if (JgyUtils.getInstance().checkAppPlatform() != JgyUtils.YXPD1Platform) {
|
||||
Settings.System.putString(mContext.getContentResolver(), CommonConfig.ACTIVATIONBEAN_CODE_KEY, ebagCode);
|
||||
Settings.Global.putInt(mContext.getContentResolver(), CommonConfig.UIUI_ACTIVATION_KEY, 1);
|
||||
}
|
||||
@@ -1357,7 +1357,7 @@ public class PushManager {
|
||||
Log.e(TAG, "orderDeleteApp: pkgs = " + pkgs);
|
||||
mMMKV.encode(DEBUG_APP_LIST, pkgs);
|
||||
if (ApkUtils.isSystemApp(mContext, pkg)) {
|
||||
JGYUtils.getInstance().hideApp(pkg);
|
||||
JgyUtils.getInstance().hideApp(pkg);
|
||||
} else {
|
||||
ApkUtils.UninstallAPP(mContext, pkg);
|
||||
}
|
||||
@@ -1529,4 +1529,5 @@ public class PushManager {
|
||||
String app_package = jsonObject.get("app_package").getAsString();
|
||||
ApkUtils.openPackage(mContext, app_package);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user