From 2f64e6236b49151fbea3f49d841dee511d65a10d Mon Sep 17 00:00:00 2001 From: ILoveOpenSourceApplications Date: Fri, 2 Aug 2024 19:02:10 +0530 Subject: [PATCH] improve code clarity and maintainability --- .../core/src/main/kotlin/org/microg/gms/ui/Utils.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/play-services-base/core/src/main/kotlin/org/microg/gms/ui/Utils.kt b/play-services-base/core/src/main/kotlin/org/microg/gms/ui/Utils.kt index a0ecd88e1e..974963b54e 100644 --- a/play-services-base/core/src/main/kotlin/org/microg/gms/ui/Utils.kt +++ b/play-services-base/core/src/main/kotlin/org/microg/gms/ui/Utils.kt @@ -47,8 +47,9 @@ fun NavController.navigate(context: Context, @IdRes resId: Int, args: Bundle? = } fun Context.hideAppIcon(hide: Boolean) { + val componentName = ComponentName("org.microg.gms.ui", "org.microg.gms.ui.SettingsActivity") packageManager.setComponentEnabledSetting( - ComponentName.createRelative(this, "org.microg.gms.ui.SettingsActivity"), + componentName, when (hide) { true -> PackageManager.COMPONENT_ENABLED_STATE_DISABLED false -> PackageManager.COMPONENT_ENABLED_STATE_ENABLED