mirror of
https://github.com/SimpleMobileTools/Simple-App-Launcher.git
synced 2025-02-08 07:48:39 +01:00
fix #52, use properly localized app launcher labels
This commit is contained in:
parent
78ee51acf5
commit
8e703e02b4
@ -125,7 +125,7 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
||||
cursor.use {
|
||||
while (cursor.moveToNext()) {
|
||||
val id = cursor.getIntValue(COL_ID)
|
||||
val name = cursor.getStringValue(COL_NAME)
|
||||
var name = cursor.getStringValue(COL_NAME)
|
||||
val packageName = cursor.getStringValue(COL_PKG_NAME)
|
||||
|
||||
var drawable: Drawable? = null
|
||||
@ -135,6 +135,7 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
||||
val launcher = context.getSystemService(Context.LAUNCHER_APPS_SERVICE) as LauncherApps
|
||||
val activityList = launcher.getActivityList(packageName, android.os.Process.myUserHandle())[0]
|
||||
drawable = activityList.getBadgedIcon(0)
|
||||
name = activityList.label.toString()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user