Exception java.lang.IllegalStateException:
at androidx.fragment.app.Fragment.requireContext (Fragment.java:967)
at com.wireguard.android.fragment.TunnelListFragment$tunnelFileImportResultLauncher$1$1.invokeSuspend (TunnelListFragment.kt:64)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:104)
at android.os.Handler.handleCallback (Handler.java:761)
at android.os.Handler.dispatchMessage (Handler.java:98)
at android.os.Looper.loop (Looper.java:156)
at android.app.ActivityThread.main (ActivityThread.java:6617)
at java.lang.reflect.Method.invoke
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:832)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Harsh - feel free to replace this commit with something better. I'm sure
it's the most terrible way to do it.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This required some weird changes to prevent clipping on the top, because
apparently the new switch is a bit fatter.
I think this actually looks a bit uglier than before, but it seems like
that's what Material design wants. Maybe we can improve it?
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
For Google Play Store builds, we'll display an alert box. This was
inspired by the discussion around StreetComplete; hopefully we'll have a
similar okay outcome.
Link: https://github.com/streetcomplete/streetcomplete/issues/3768
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
I'm not sure why that comment (Samuel's) was there saying it was
necessary. Given it's been async for a long while, this wasn't
guaranteed anyway. So let's get rid of it and see what happens. Screen
rotation seems fine thus far.
Cc: Samuel Holland <samuel@sholland.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
- The hand-rolled clean task is not required
- Tasks should use configureEach to prevent eager evaluation
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Otherwise, for lots of apps, the dialog shows before they're enumerated,
and the button text never gets set.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Fixes: 4f261560 ("gradle: force the use of an older NDK version")
Signed-off-by: L.W.Reek <syphyr@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
When listen port and MTU are hidden, we need a barrier here.
Signed-off-by: SlipkHunter <abrito025@gmail.com>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
The TV theme has been kept as-is since Material You guidance around this
is a bit scarce at the moment.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This check was added in 3c31c340d8 when the kernel module loader was
introduced into the app lifecycle, to avoid attempting to start a root shell
twice. When the module loader was removed in a03ad51622, this flag
was accidentally left in when it should have been deleted.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Apparently some translations make this wrap, which is bad.
Signed-off-by: Vlad Loktionov <yobabay23@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Fixes annoying behavior in quick settings widget, when you enable
the tunnel, try to switch to last used app, but instead it switches to
the toggle activity and turns the tunnel off.
Signed-off-by: Rin Patch <rin@patch.cx>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Add a new feature to import a tunnel from a saved QR image, this feature
integrates into 'import from file' flow, however adds a condition, if
file is an image, attempt to parse it as QR image file.
My use case for this feature, is to allow easier sharing of tunnels to
family. Scanning QR code is ok when you have an external display to
show it, but if you sent QR code to someone, there is no way to import
it in the app. If you share a config file, that becomes way harder for
a non-technical person to import as now they need to find a file with
that name in the file picker etc etc, Where the images are very visible
in the file picker, and user can easily recognize it for import.
Testing:
- Click "+" blue button, try to import a valid `.conf` file - the
'original' file flow should not be affected
- Click "+" blue button, try to import a valid QR code image - if QR
code was parsed, then a new tunnel will be added.
- Click "+" blue button, try to import an invalid QR code image - Error
message will be shown
Signed-off-by: Nikita Pustovoi <deishelon@gmail.com>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>