Found this Android quirk the other day.
Let's say we have a fullscreen application that we want to programmatically switch to Freeform without losing its state. We can start a launcher activity of some sort - in my example i've used Blue Line Console for this - as a freeform window, and let this launcher activity re-launch the app that was topmost. Android tries to launch a freeform app because the launch intent was given by a freeform app, and the app we're launching becomes, itself, freeform - without losing its state!
What I'm saying is, we could implement an activity in SmartDock that launches applications passed to it as an intent while itself being an empty freeform window that closes after launching the passed application (or if no application was passed). And while we're at it, might as well add shortcuts like Taskbar had, shortcuts that you can place in your default launcher that would open a desired app in freeform - since that part of Taskbar (along with everything else) is broken since Android 12.1 window manager rewrite.
Found this Android quirk the other day.
Let's say we have a fullscreen application that we want to programmatically switch to Freeform without losing its state. We can start a launcher activity of some sort - in my example i've used Blue Line Console for this - as a freeform window, and let this launcher activity re-launch the app that was topmost. Android tries to launch a freeform app because the launch intent was given by a freeform app, and the app we're launching becomes, itself, freeform - without losing its state!
What I'm saying is, we could implement an activity in SmartDock that launches applications passed to it as an intent while itself being an empty freeform window that closes after launching the passed application (or if no application was passed). And while we're at it, might as well add shortcuts like Taskbar had, shortcuts that you can place in your default launcher that would open a desired app in freeform - since that part of Taskbar (along with everything else) is broken since Android 12.1 window manager rewrite.