diff --git a/build.gradle.kts b/build.gradle.kts index 1ea35a00..2e49fb45 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,7 +12,7 @@ buildscript { } dependencies { - classpath("com.android.tools.build:gradle:4.0.0-rc01") + classpath("com.android.tools.build:gradle:4.0.0") classpath("com.github.ben-manes:gradle-versions-plugin:0.28.0") classpath("com.google.firebase:firebase-crashlytics-gradle:2.1.1") classpath("com.google.android.gms:oss-licenses-plugin:0.10.2") diff --git a/mobile/build.gradle.kts b/mobile/build.gradle.kts index d04956da..8e02790f 100644 --- a/mobile/build.gradle.kts +++ b/mobile/build.gradle.kts @@ -83,7 +83,7 @@ dependencies { implementation("com.android.billingclient:billing-ktx:2.2.1") implementation("com.github.topjohnwu.libsu:core:2.5.1") implementation("com.google.android.gms:play-services-oss-licenses:17.0.0") - implementation("com.google.android.material:material:1.1.0") + implementation("com.google.android.material:material:1.2.0-beta01") implementation("com.google.firebase:firebase-analytics-ktx:17.4.2") implementation("com.google.firebase:firebase-crashlytics:17.0.0") implementation("com.google.zxing:core:3.4.0") diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/TetherType.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/TetherType.kt index 22a21244..b1638a68 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/TetherType.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/TetherType.kt @@ -2,7 +2,6 @@ package be.mygod.vpnhotspot.net import android.content.res.Resources import androidx.core.os.BuildCompat -import be.mygod.vpnhotspot.App.Companion.app import be.mygod.vpnhotspot.R import java.util.regex.Pattern @@ -38,10 +37,9 @@ enum class TetherType { * Source: https://android.googlesource.com/platform/frameworks/base/+/32e772f/packages/Tethering/src/com/android/networkstack/tethering/TetheringConfiguration.java#93 */ init { - val appRes = app.resources - val sysRes = Resources.getSystem() - fun getRegexs(name: String) = appRes.getStringArray(sysRes - .getIdentifier(name, "array", "android")) + val system = Resources.getSystem() + fun getRegexs(name: String) = system + .getStringArray(system.getIdentifier(name, "array", "android")) .filterNotNull() .map { it.toPattern() } usbRegexs = getRegexs("config_tether_usb_regexs") @@ -51,7 +49,7 @@ enum class TetherType { bluetoothRegexs = getRegexs("config_tether_bluetooth_regexs") ncmRegexs = if (BuildCompat.isAtLeastR()) getRegexs("config_tether_ncm_regexs") else emptyList() ethernetRegex = if (BuildCompat.isAtLeastR()) { - appRes.getString(sysRes.getIdentifier("config_ethernet_iface_regex", "string", "android")).run { + system.getString(system.getIdentifier("config_ethernet_iface_regex", "string", "android")).run { if (isEmpty()) null else toPattern() } } else null