1.4.0521 优化开机动画 控制主页控件显示
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.aoleyun.sn.push;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.ComponentName;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.ContextWrapper;
|
||||
@@ -258,7 +259,7 @@ public class PushManager {
|
||||
Toaster.debugShow("收到管控:系统设置");
|
||||
if (!TextUtils.isEmpty(extras)) {
|
||||
JGYUtils.getInstance().SettingSysData(extras);
|
||||
JGYUtils.getInstance().removeAllTask();
|
||||
// JGYUtils.getInstance().removeAllTask();
|
||||
}
|
||||
break;
|
||||
case MSG_BROWSER:
|
||||
@@ -777,6 +778,7 @@ public class PushManager {
|
||||
Utils.ariaDownload(mContext, app_url, packageObj);
|
||||
} else {
|
||||
Log.e(TAG, "doDownloadAndInstall: " + app_package + "已安装最新版");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1088,22 +1090,30 @@ public class PushManager {
|
||||
private void setDefalutApp(String extras) {
|
||||
if (TextUtils.isEmpty(extras)) {
|
||||
JGYUtils.getInstance().setDefaultDesktop("");
|
||||
JGYUtils.getInstance().openLauncher3();
|
||||
} else {
|
||||
JsonObject jsonObject = GsonUtils.getJsonObject(extras);
|
||||
JsonElement launcherElement = jsonObject.get("default_launcher");
|
||||
if (launcherElement.isJsonNull()) {
|
||||
JGYUtils.getInstance().setDefaultDesktop("");
|
||||
mMMKV.encode(CommonConfig.DEFAULT_LAUNCHER_PACKAGE_NAME, "");
|
||||
JGYUtils.getInstance().openLauncher3();
|
||||
// SPUtils.put(mContext, "default_launcher", "");
|
||||
} else {
|
||||
String default_launcher = launcherElement.getAsString();
|
||||
if (TextUtils.isEmpty(default_launcher)) {
|
||||
JGYUtils.getInstance().setDefaultDesktop("");
|
||||
mMMKV.encode(CommonConfig.DEFAULT_LAUNCHER_PACKAGE_NAME, "");
|
||||
|
||||
JGYUtils.getInstance().openLauncher3();
|
||||
// SPUtils.put(mContext, "default_launcher", "");
|
||||
} else {
|
||||
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);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
mContext.startActivity(intent);
|
||||
mMMKV.encode(CommonConfig.DEFAULT_LAUNCHER_PACKAGE_NAME, default_launcher);
|
||||
// SPUtils.put(mContext, "default_launcher", default_launcher);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user