-
Notifications
You must be signed in to change notification settings - Fork 431
Use alternate method for quick-tile #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
The abrupt disappearance of the quicktile-menu could be improved by providing an alternative layout to the TunnelToggleActivity which is only show when it was called by the quicktile. Generally this is only an issue when the app was in background and no tunnel is available, otherwise the quicktile works as intended. |
I have added a dummy-progressbar which will be shown in case the app was in background. It stays for 1000ms and then closes itself, after the tunnel has been triggered. This makes the transition way more visually pleasing. |
c1d59a2
to
6aab7cc
Compare
We'll be keeping the system alert window for now to preserve the UX but I agree that it's a rather scary permission for something relatively benign and will be looking into alternative options. |
But isn't this a viable alternative? If you need changes to make it even better, i can do so, but i am not sure there is another different way. |
Also, i have been using this implementation for the last year or so, and the drawback is so miniscule that i basically forgot that it was there just until i re-read this thread |
Hmm I guess it's the only way to do it :/ Can you rebase and squash your commits? |
Sure! I will also check if the weird quicktile behaviour is only present in older android versions, maybe its not present in android 15 and later, and that's why i stopped noticing. |
1d65de2
to
b52b517
Compare
Signed-off-by: felix <[email protected]>
I updated the branch, there are no conflicts anymore. (I think i am one commit behind though.) I have tested the observed behaviour again, and it seems to be only valid on Android 14 and earlier. 15&16 work flawless. If the app has been in the background for too long or has been terminated another way, pressing the quicktile will not start the tunnel (directly). Instead it launches a visible launching activity with a progressbar, that closes once the tunnel has been established. If the app has been opened recently, the tunnel will start directly. On 15 and later, it seems launching the task from background works immediately. |
This change removes the need for the permission to draw over other apps.
Personally, i find this permission a bit intrusive, so i tried to find a different mechanism to start up a tunnel.
The new one uses a trick to start an activity completely invisible, and immediately move it to the backstack.
The only drawback that i found is that the quicktile-menu immediately disappears on clicking the tile, instead of slowly closing.