Skip to content

Conversation

newhinton
Copy link

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.

@newhinton
Copy link
Author

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.

@newhinton
Copy link
Author

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.

@zx2c4-bot zx2c4-bot force-pushed the master branch 4 times, most recently from c1d59a2 to 6aab7cc Compare May 8, 2025 02:59
@msfjarvis
Copy link
Member

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.

@msfjarvis msfjarvis closed this Sep 19, 2025
@newhinton
Copy link
Author

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.

@newhinton
Copy link
Author

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

@msfjarvis
Copy link
Member

Hmm I guess it's the only way to do it :/

Can you rebase and squash your commits?

@msfjarvis msfjarvis reopened this Sep 19, 2025
@newhinton
Copy link
Author

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.

@newhinton newhinton force-pushed the master branch 2 times, most recently from 1d65de2 to b52b517 Compare September 20, 2025 10:16
@newhinton
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants