diff options
8 files changed, 12 insertions, 7 deletions
diff --git a/ui/src/main/AndroidManifest.xml b/ui/src/main/AndroidManifest.xml index c4de42ca..613562e1 100644 --- a/ui/src/main/AndroidManifest.xml +++ b/ui/src/main/AndroidManifest.xml @@ -116,7 +116,8 @@ android:value="false" /> </service> - <meta-data android:name="android.content.APP_RESTRICTIONS" + <meta-data + android:name="android.content.APP_RESTRICTIONS" android:resource="@xml/app_restrictions" /> </application> diff --git a/ui/src/main/java/com/wireguard/android/activity/TunnelToggleActivity.kt b/ui/src/main/java/com/wireguard/android/activity/TunnelToggleActivity.kt index 99474344..9b801202 100644 --- a/ui/src/main/java/com/wireguard/android/activity/TunnelToggleActivity.kt +++ b/ui/src/main/java/com/wireguard/android/activity/TunnelToggleActivity.kt @@ -41,6 +41,7 @@ class TunnelToggleActivity : AppCompatActivity() { finishAffinity() } } + companion object { private const val TAG = "WireGuard/TunnelToggleActivity" } diff --git a/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt b/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt index 963ae12b..89ad9a67 100644 --- a/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt +++ b/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt @@ -73,7 +73,7 @@ class ObservableTunnel internal constructor( var config = config get() { if (field == null) - // Opportunistically fetch this if we don't have a cached one, and rely on data bindings to update it eventually + // Opportunistically fetch this if we don't have a cached one, and rely on data bindings to update it eventually GlobalScope.launch(Dispatchers.Main.immediate) { try { manager.getTunnelConfig(this@ObservableTunnel) @@ -109,7 +109,7 @@ class ObservableTunnel internal constructor( var statistics: Statistics? = null get() { if (field == null || field?.isStale != false) - // Opportunistically fetch this if we don't have a cached one, and rely on data bindings to update it eventually + // Opportunistically fetch this if we don't have a cached one, and rely on data bindings to update it eventually GlobalScope.launch(Dispatchers.Main.immediate) { try { manager.getTunnelStatistics(this@ObservableTunnel) diff --git a/ui/src/main/java/com/wireguard/android/preference/KernelModuleDisablerPreference.kt b/ui/src/main/java/com/wireguard/android/preference/KernelModuleDisablerPreference.kt index 04894b14..3d47d2ea 100644 --- a/ui/src/main/java/com/wireguard/android/preference/KernelModuleDisablerPreference.kt +++ b/ui/src/main/java/com/wireguard/android/preference/KernelModuleDisablerPreference.kt @@ -26,6 +26,7 @@ import kotlin.system.exitProcess class KernelModuleDisablerPreference(context: Context, attrs: AttributeSet?) : Preference(context, attrs) { private var state = State.UNKNOWN + init { isVisible = false lifecycleScope.launch { @@ -48,7 +49,7 @@ class KernelModuleDisablerPreference(context: Context, attrs: AttributeSet?) : P } lifecycleScope.launch { val observableTunnels = Application.getTunnelManager().getTunnels() - val downings = observableTunnels.map { async(SupervisorJob()) { it.setStateAsync(Tunnel.State.DOWN) } } + val downings = observableTunnels.map { async(SupervisorJob()) { it.setStateAsync(Tunnel.State.DOWN) } } try { downings.awaitAll() withContext(Dispatchers.IO) { diff --git a/ui/src/main/java/com/wireguard/android/util/AdminKnobs.kt b/ui/src/main/java/com/wireguard/android/util/AdminKnobs.kt index ff8dbd8c..77fadcc2 100644 --- a/ui/src/main/java/com/wireguard/android/util/AdminKnobs.kt +++ b/ui/src/main/java/com/wireguard/android/util/AdminKnobs.kt @@ -12,5 +12,6 @@ import com.wireguard.android.Application object AdminKnobs { private val restrictions: RestrictionsManager? = Application.get().getSystemService() val disableConfigExport: Boolean - get() = restrictions?.applicationRestrictions?.getBoolean("disable_config_export", false) ?: false + get() = restrictions?.applicationRestrictions?.getBoolean("disable_config_export", false) + ?: false } diff --git a/ui/src/main/java/com/wireguard/android/util/BiometricAuthenticator.kt b/ui/src/main/java/com/wireguard/android/util/BiometricAuthenticator.kt index d5de319f..677737d8 100644 --- a/ui/src/main/java/com/wireguard/android/util/BiometricAuthenticator.kt +++ b/ui/src/main/java/com/wireguard/android/util/BiometricAuthenticator.kt @@ -19,6 +19,7 @@ import com.wireguard.android.R object BiometricAuthenticator { private const val TAG = "WireGuard/BiometricAuthenticator" + // Not all devices support strong biometric auth so we're allowing both device credentials as // well as weak biometrics. private const val allowedAuthenticators = Authenticators.DEVICE_CREDENTIAL or Authenticators.BIOMETRIC_WEAK diff --git a/ui/src/main/res/anim/scale_down.xml b/ui/src/main/res/anim/scale_down.xml index b6ece430..3d574180 100644 --- a/ui/src/main/res/anim/scale_down.xml +++ b/ui/src/main/res/anim/scale_down.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<set xmlns:android="http://schemas.android.com/apk/res/android" > +<set xmlns:android="http://schemas.android.com/apk/res/android"> <scale android:duration="300" android:fromXScale="1.0" diff --git a/ui/src/main/res/anim/scale_up.xml b/ui/src/main/res/anim/scale_up.xml index 07dd5787..e429b8bf 100644 --- a/ui/src/main/res/anim/scale_up.xml +++ b/ui/src/main/res/anim/scale_up.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<set xmlns:android="http://schemas.android.com/apk/res/android" > +<set xmlns:android="http://schemas.android.com/apk/res/android"> <scale android:duration="300" android:fromXScale="0" |