summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/java
AgeCommit message (Collapse)Author
2023-04-04tunnel: add bgp-javaMikael Magnusson
Add bgp-java. Update peer list based on TunnelEncapsAttribute in BGP. Add backend to bgp constructor
2023-04-04WIP add ConfigDetail and PeerDetailMikael Magnusson
2023-04-04WIP: add dhcp addresses to tunnel detailsMikael Magnusson
2023-04-04ui,tunnel: add lastest handshake to peer detailsMikael Magnusson
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
2023-04-04ui,tunnel: implement http proxy for Android 10+Mikael Magnusson
Allow getting package names of tv apps.
2023-04-04ui,tunnel: add HTTP proxy setting to Go backendMikael Magnusson
Only make the HTTP proxy settings visible on supported Android versions, i.e. Android 10 (AKA Android Q) and later. Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
2023-04-04ui: always use MaterialAlertDialogBuilderJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: force dark theme in TV modeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: use real M3 themeing on TVJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: redirect to play store if no file manager on tvJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: detect tv framework stubs when getting contentJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: use ErrorMessages consistentlyJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: do not crash if tunnel preparation failsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: do not OOM when leaving log window open for a whileJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: show bottom sheet sync to prevent double addJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: do not return to detail page when restoring stateJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: never access CREATOR directlyJason A. Donenfeld
All of the parcelers have their own type prefix. So we have to actually use the legit methods. This is a bit annoying, as there's no fully compatible way across all API versions, so we have to branch. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: never throw on link clicksJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-30ui: do not allow double clicking fab to show menu twiceJason A. Donenfeld
Exception java.lang.IllegalStateException: at androidx.fragment.app.FragmentStore.addFragment (FragmentStore.java:92) at androidx.fragment.app.FragmentManager.addFragment (FragmentManager.java:1481) at androidx.fragment.app.BackStackRecord.executeOps (BackStackRecord.java:387) at androidx.fragment.app.FragmentManager.executeOps (FragmentManager.java:1965) at androidx.fragment.app.FragmentManager.executeOpsTogether (FragmentManager.java:1873) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute (FragmentManager.java:1823) at androidx.fragment.app.FragmentManager.execPendingActions (FragmentManager.java:1760) at androidx.fragment.app.FragmentManager$5.run (FragmentManager.java:547) at android.os.Handler.handleCallback (Handler.java:938) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loop (Looper.java:268) at android.app.ActivityThread.main (ActivityThread.java:8101) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:627) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:997) Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-30ui: remove unneeded @JvmStatic annotationsJason A. Donenfeld
These are only needed on methods called from databindings, since those compile to java. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-30ui: use app resources instead of ctx for strings in callbackJason A. Donenfeld
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>
2023-03-30ui: use M3 theme for TV to prevent crashJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-28ui: add log items in buffered batchesJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-28ui: color verbose logs the same as debug logsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-28ui: don't call getColor on already resolved attributeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-27ui: cancel actionmode when pressing back buttonJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-27ui: simplify actionmode castJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-27ui: introduce a fresh set of Material3 themes and migrate to themHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-03-27ui: use AndroidX `BundleCompat` for extracting parcelableHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-03-25ui: switch from SwitchMaterial to MaterialSwitchJason A. Donenfeld
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>
2023-03-24ui: bring back donation buttonJason A. Donenfeld
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>
2023-03-24ui: use Material switch componentHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-03-24ui: migrate to OnBackPressedDispatcherJason A. Donenfeld
This is compatible with Android 13's prediction-based back gesture animation. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-24ui: set selected tunnel after creating fragmentsJason A. Donenfeld
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>
2023-03-24ui: switch from using launchWhenCreated to using repeatOnLifecycleJason A. Donenfeld
Apparently the former is deprecated. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-24ui: simplify IME displaying in ConfigNamingDialogFragmentJason A. Donenfeld
Also cleanup some event listener flow. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-22ui: migrate to MenuProviderHarsh Shandilya
AndroidX Activity 1.4.0 introduced the new lifecycle-dependent MenuProvider APIs that supersede existing onCreateOptionsMenu-style menus. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-03-22ui: address Parcelable API deprecationsHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-03-22ui: address PackageManager API deprecationsHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-03-22ui: set button text after loading app list in AppListDialogFragmentJason A. Donenfeld
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>
2023-03-21global: bump copyright dateJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-05-26ui: move default style to Material3 with Dynamic ColorsHarsh Shandilya
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>
2022-05-26ui: remove unnecessary boolean checkHarsh Shandilya
This check was added in 3c31c340d86f 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 a03ad51622d338d1c, this flag was accidentally left in when it should have been deleted. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2022-03-06ui: make validity check from QR code image scanner staticHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2022-03-06ui: allow importing tunnel from an QR image stored on the deviceNikita Pustovoi
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>
2022-01-08ui: make when statements exhaustive everywhereHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-10-29global: bump copyright yearJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-29tunnel: remove kernel module downloaderJason A. Donenfeld
Nathan Chance dropped the ball repeatedly and never maintained this in a consistent way that anybody could use. With Android 12 out now, just drop it all together. A bummer, but I don't see much of a choice. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-28gradle: upgrade AndroidX dependenciesHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-10-25ui: upgrade zxing-android-embeddedHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>