Fix deleting app shortcuts
This commit is contained in:
parent
bdf8b1f0d7
commit
79ab775ef0
@ -159,6 +159,9 @@ internal data class LauncherShortcut(
|
|||||||
return LauncherShortcutSerializer()
|
return LauncherShortcutSerializer()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override val canDelete: Boolean
|
||||||
|
get() = launcherShortcut.isPinned
|
||||||
|
|
||||||
override suspend fun delete(context: Context) {
|
override suspend fun delete(context: Context) {
|
||||||
val launcherApps = context.getSystemService(Context.LAUNCHER_APPS_SERVICE) as LauncherApps
|
val launcherApps = context.getSystemService(Context.LAUNCHER_APPS_SERVICE) as LauncherApps
|
||||||
if (!launcherApps.hasShortcutHostPermission()) return
|
if (!launcherApps.hasShortcutHostPermission()) return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user