Compile against Tiramisu
This commit is contained in:
@@ -10,13 +10,13 @@ plugins {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
val javaVersion = JavaVersion.VERSION_11
|
val javaVersion = JavaVersion.VERSION_11
|
||||||
buildToolsVersion = "32.0.0"
|
buildToolsVersion = "33.0.0"
|
||||||
compileOptions {
|
compileOptions {
|
||||||
isCoreLibraryDesugaringEnabled = true
|
isCoreLibraryDesugaringEnabled = true
|
||||||
sourceCompatibility = javaVersion
|
sourceCompatibility = javaVersion
|
||||||
targetCompatibility = javaVersion
|
targetCompatibility = javaVersion
|
||||||
}
|
}
|
||||||
compileSdk = 32
|
compileSdk = 33
|
||||||
kotlinOptions.jvmTarget = javaVersion.toString()
|
kotlinOptions.jvmTarget = javaVersion.toString()
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "be.mygod.vpnhotspot"
|
applicationId = "be.mygod.vpnhotspot"
|
||||||
@@ -57,10 +57,10 @@ android {
|
|||||||
}
|
}
|
||||||
create("google") {
|
create("google") {
|
||||||
dimension = "freedom"
|
dimension = "freedom"
|
||||||
targetSdk = 32
|
targetSdk = 33
|
||||||
versionNameSuffix = "-g"
|
versionNameSuffix = "-g"
|
||||||
buildConfigField("boolean", "DONATIONS", "false")
|
buildConfigField("boolean", "DONATIONS", "false")
|
||||||
buildConfigField("int", "TARGET_SDK", "32")
|
buildConfigField("int", "TARGET_SDK", "33")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sourceSets.getByName("androidTest").assets.srcDir("$projectDir/schemas")
|
sourceSets.getByName("androidTest").assets.srcDir("$projectDir/schemas")
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ class TetheringFragment : Fragment(), ServiceConnection, Toolbar.OnMenuItemClick
|
|||||||
val activity = activity as? MainActivity
|
val activity = activity as? MainActivity
|
||||||
val item = activity?.binding?.toolbar?.menu?.findItem(R.id.monitor) ?: return // assuming no longer foreground
|
val item = activity?.binding?.toolbar?.menu?.findItem(R.id.monitor) ?: return // assuming no longer foreground
|
||||||
item.isNotGone = canMonitor.isNotEmpty()
|
item.isNotGone = canMonitor.isNotEmpty()
|
||||||
item.subMenu.apply {
|
item.subMenu!!.apply {
|
||||||
clear()
|
clear()
|
||||||
for (iface in canMonitor.sorted()) add(iface).setOnMenuItemClickListener {
|
for (iface in canMonitor.sorted()) add(iface).setOnMenuItemClickListener {
|
||||||
ContextCompat.startForegroundService(activity, Intent(activity, TetheringService::class.java)
|
ContextCompat.startForegroundService(activity, Intent(activity, TetheringService::class.java)
|
||||||
@@ -179,7 +179,7 @@ class TetheringFragment : Fragment(), ServiceConnection, Toolbar.OnMenuItemClick
|
|||||||
private var apConfigurationRunning = false
|
private var apConfigurationRunning = false
|
||||||
override fun onMenuItemClick(item: MenuItem?): Boolean {
|
override fun onMenuItemClick(item: MenuItem?): Boolean {
|
||||||
return when (item?.itemId) {
|
return when (item?.itemId) {
|
||||||
R.id.configuration -> item.subMenu.run {
|
R.id.configuration -> item.subMenu!!.run {
|
||||||
findItem(R.id.configuration_repeater).isNotGone = Services.p2p != null
|
findItem(R.id.configuration_repeater).isNotGone = Services.p2p != null
|
||||||
findItem(R.id.configuration_temp_hotspot).isNotGone =
|
findItem(R.id.configuration_temp_hotspot).isNotGone =
|
||||||
Build.VERSION.SDK_INT >= 26 && adapter.localOnlyHotspotManager.binder?.configuration != null
|
Build.VERSION.SDK_INT >= 26 && adapter.localOnlyHotspotManager.binder?.configuration != null
|
||||||
|
|||||||
Reference in New Issue
Block a user