Closed abrenoch closed 6 years ago
Works fine in a general usage scenario. Also correctly shows a toast if the host / port have not been configured
Unfortunately, when the user has not given permanent screen recording permission, the dialog for it will pop up; but the dialog is covered by the open settings drawer. Ideally, we would close the settings drawer when needed, but we have no way of knowing whether the dialog will appear:
Which would mean closing the dialog always; which might bother regular users since this is not expected (try toggling your wifi, the settings panel stays open).
I though long and hard about this, and couldn't think of a solution. To my knowledge there is no way of detecting whether the dialog was shown (the BootActivity gets paused for a millisecond even when it turns out the dialog is not required).
What we can do is check whether the connection settings were configured when a tile is enabled, and start the settings when required. For this I added commits to your PR
I also discovered determining if the screen record permission had been granted or not was hard to tell... You would really think that information would be readily available, but I simply couldn't find a way to determine it.
I agree about confirmation dialog... There is the startActivityAndCollapse
call that would close the notification pane, but that would only make sense if permission is not granted... And since we have no way of knowing, no sure if that is possible.
You don't happen to have any ideas to making the BootActivity
less invasive do you? It only blinks into existence for a split second before closing itself, but it is noticeable. I've tried pretty much every strategy I could find online, but still feel a little underwhelmed by it!
Also one other small thing - I noticed sometimes the activity takes a while to respond after punching the tile (usually on the first click, and subsequent clicks run faster). Any thoughts on that?
I'll merge the changes for now, if we find a better way to make BootActivity
more stealthy it can just be a separate PR!
Adds a quick settings tile to toggle the grabber on/off.
Uses the
BootActivity
, so there is a slight screen flash, but since the settings pane is open it is mostly unnoticeable.closes #24