From 3598ba1c33fa0498c26585c1aaf4d2f01bd7f9c2 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 13 Feb 2020 15:35:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/LauncherIconHelp.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/help/LauncherIconHelp.kt b/app/src/main/java/io/legado/app/help/LauncherIconHelp.kt index c079ad665..b70f0939d 100644 --- a/app/src/main/java/io/legado/app/help/LauncherIconHelp.kt +++ b/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( ComponentName(App.INSTANCE, WelcomeActivity::class.java.name), PackageManager.COMPONENT_ENABLED_STATE_ENABLED,