Skip to content

Commit

Permalink
improve code clarity and maintainability
Browse files Browse the repository at this point in the history
  • Loading branch information
ILoveOpenSourceApplications committed Aug 2, 2024
1 parent 2b6524a commit 2f64e62
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f64e62

Please sign in to comment.