Skip to content

Commit

Permalink
Fix: Better support for feature phones.
Browse files Browse the repository at this point in the history
fixes #474
  • Loading branch information
HeCodes2Much committed Apr 27, 2024
1 parent d185045 commit 278ef1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ fun Context.searchOnPlayStore(query: String? = null): Boolean {
}
}


fun Context.isPackageInstalled(packageName: String, userHandle: UserHandle = android.os.Process.myUserHandle()): Boolean {
val launcher = getSystemService(Context.LAUNCHER_APPS_SERVICE) as LauncherApps
val activityInfo = launcher.getActivityList(packageName, userHandle)
return activityInfo.size > 0
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class HomeFragment : Fragment(), View.OnClickListener, View.OnLongClickListener
@Suppress("DEPRECATION")
vibrator = context?.getSystemService(VIBRATOR_SERVICE) as Vibrator


initObservers()
initSwipeTouchListener()
initClickListeners()
Expand Down Expand Up @@ -891,6 +892,8 @@ class HomeFragment : Fragment(), View.OnClickListener, View.OnLongClickListener
)
}
gravity = prefs.homeAlignment.value()
isFocusable = true
isFocusableInTouchMode = true
val padding: Int = prefs.textMarginSize
setPadding(0, padding, 0, padding)
if (prefs.useCustomIconFont) {
Expand Down

0 comments on commit 278ef1e

Please sign in to comment.