fix: "DroidDeck isn't responding" on dual-screen handhelds after the bottom screen takes focus (#1871)

This commit is contained in:
MaxsTechReview authored and GitHub committed 2026-10-30 19:52:17 -04:00
1 parent 6673a892e2
commit 8088e47d14
4 files changed
+98 -11

No files matched your search

@@ -148,7 +148,15 @@ object HomeApp {
}.getOrNull()
fun startShortcut(context: Context, info: ShortcutInfo) {
context.getSystemService(LauncherApps::class.java).startShortcut(info, null, null)
val task = generateSequence(context) { (it as? android.content.ContextWrapper)?.baseContext }
.filterIsInstance<android.app.Activity>().firstOrNull()?.taskId
task?.let { com.droiddeck.launcher.ui.DualScreenPanel.yieldTo(it, true) }
try {
context.getSystemService(LauncherApps::class.java).startShortcut(info, null, null)
} catch (e: Exception) {
task?.let { com.droiddeck.launcher.ui.DualScreenPanel.yieldTo(it, false) }
throw e
}
}
fun openAppInfo(context: Context, app: LaunchableApp) {