Commit 8eceacee by Baoxy

build: 修复切换弹窗时间过长

parent 7e25b94a
...@@ -31,7 +31,7 @@ class SwitchOutMdm constructor(var context: Context) : ISwitch() { ...@@ -31,7 +31,7 @@ class SwitchOutMdm constructor(var context: Context) : ISwitch() {
DpmManager.instance.applicationManager.let { DpmManager.instance.applicationManager.let {
it.removePersistentApp(getPersistentList(context)) it.removePersistentApp(getPersistentList(context))
it.enableComponent(context, COMPONENT_UPDATE_SYSTEM) it.enableComponent(context, COMPONENT_UPDATE_SYSTEM)
it.enableComponent(context, COMPONENT_ENTERPRISE_PRIVACY_SETTING) // it.enableComponent(context, COMPONENT_ENTERPRISE_PRIVACY_SETTING)
} }
DpmManager.instance.restrictionManager.let { DpmManager.instance.restrictionManager.let {
it.setAdbDisabled(false) it.setAdbDisabled(false)
......
...@@ -43,14 +43,14 @@ class WorkManager private constructor(var context: Context) { ...@@ -43,14 +43,14 @@ class WorkManager private constructor(var context: Context) {
runOnMain { LoadingDialog.getInstance(context).show("切换中") } runOnMain { LoadingDialog.getInstance(context).show("切换中") }
// launcher.openAccessibility() // launcher.openAccessibility()
SwitchInMdm.getInstance(context).init() SwitchInMdm.getInstance(context).init()
activate(launcher)
runOnMain { runOnMain {
LoadingDialog.getInstance(context).dismiss()
if (Prefs.isTips(launcher)) { if (Prefs.isTips(launcher)) {
DialogManager.showMessageDialogOnlySure(launcher, launcher.getString(R.string.common_remind), launcher.getString(R.string.edu_item_first_install_tips), null) DialogManager.showMessageDialogOnlySure(launcher, launcher.getString(R.string.common_remind), launcher.getString(R.string.edu_item_first_install_tips), null)
Prefs.setTips(launcher, false) Prefs.setTips(launcher, false)
LoadingDialog.getInstance(context).dismiss()
} }
} }
activate(launcher)
checkLocalUpdateFile() //检查本地更新文件 checkLocalUpdateFile() //检查本地更新文件
delay(5000) delay(5000)
ActivationHelper.checkActivate(launcher, EduCheckActiveStatusListener(launcher)) ActivationHelper.checkActivate(launcher, EduCheckActiveStatusListener(launcher))
......
...@@ -46,7 +46,7 @@ public class Package { ...@@ -46,7 +46,7 @@ public class Package {
public static ComponentName COMPONENT_STARTUP_SETTINGS = new ComponentName("com.android.settings", "com.android.settings.HWSettings"); public static ComponentName COMPONENT_STARTUP_SETTINGS = new ComponentName("com.android.settings", "com.android.settings.HWSettings");
public static ComponentName COMPONENT_NAME_HW_HWOUC = new ComponentName("com.huawei.android.hwouc", "com.huawei.android.hwouc.ui.activities.MainEntranceActivity");//软件更新 public static ComponentName COMPONENT_NAME_HW_HWOUC = new ComponentName("com.huawei.android.hwouc", "com.huawei.android.hwouc.ui.activities.MainEntranceActivity");//软件更新
public static ComponentName COMPONENT_HUAWEI_LUANCHER = new ComponentName("com.huawei.android.launcher", "com.huawei.android.launcher.unihome.UniHomeLauncher"); public static ComponentName COMPONENT_HUAWEI_LUANCHER = new ComponentName("com.huawei.android.launcher", "com.huawei.android.launcher.unihome.UniHomeLauncher");
public static ComponentName COMPONENT_ENTERPRISE_PRIVACY_SETTING = new ComponentName("com.android.settings", "com.android.settings.Settings$EnterprisePrivacySettingsActivity"); // public static ComponentName COMPONENT_ENTERPRISE_PRIVACY_SETTING = new ComponentName("com.android.settings", "com.android.settings.Settings$EnterprisePrivacySettingsActivity");
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment