feat: 优化代码

pull/103/head
kunfei 5 years ago
parent b794d09005
commit 3598ba1c33
  1. 8
      app/src/main/java/io/legado/app/help/LauncherIconHelp.kt

@ -43,7 +43,13 @@ object LauncherIconHelp {
) )
} }
} }
if (!hasEnabled) { if (hasEnabled) {
packageManager.setComponentEnabledSetting(
ComponentName(App.INSTANCE, WelcomeActivity::class.java.name),
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP
)
} else {
packageManager.setComponentEnabledSetting( packageManager.setComponentEnabledSetting(
ComponentName(App.INSTANCE, WelcomeActivity::class.java.name), ComponentName(App.INSTANCE, WelcomeActivity::class.java.name),
PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.COMPONENT_ENABLED_STATE_ENABLED,

Loading…
Cancel
Save