Merge branch 'v2.4' into q-beta
This commit is contained in:
@@ -64,11 +64,11 @@ androidExtensions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def aux = [
|
def aux = [
|
||||||
'com.crashlytics.sdk.android:crashlytics:2.10.0',
|
'com.crashlytics.sdk.android:crashlytics:2.10.1',
|
||||||
'com.google.firebase:firebase-core:16.0.9',
|
'com.google.firebase:firebase-core:16.0.9',
|
||||||
]
|
]
|
||||||
def lifecycleVersion = '2.1.0-beta01'
|
def lifecycleVersion = '2.1.0-beta01'
|
||||||
def roomVersion = '2.1.0-beta01'
|
def roomVersion = '2.1.0-rc01'
|
||||||
dependencies {
|
dependencies {
|
||||||
kapt "androidx.room:room-compiler:$roomVersion"
|
kapt "androidx.room:room-compiler:$roomVersion"
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
@@ -83,7 +83,7 @@ dependencies {
|
|||||||
implementation "androidx.room:room-ktx:$roomVersion"
|
implementation "androidx.room:room-ktx:$roomVersion"
|
||||||
implementation 'com.android.billingclient:billing:2.0.0'
|
implementation 'com.android.billingclient:billing:2.0.0'
|
||||||
implementation 'com.github.topjohnwu.libsu:core:2.5.0'
|
implementation 'com.github.topjohnwu.libsu:core:2.5.0'
|
||||||
implementation 'com.google.android.material:material:1.1.0-alpha06'
|
implementation 'com.google.android.material:material:1.1.0-alpha07'
|
||||||
implementation 'com.jakewharton.timber:timber:4.7.1'
|
implementation 'com.jakewharton.timber:timber:4.7.1'
|
||||||
implementation 'com.linkedin.dexmaker:dexmaker:2.25.0'
|
implementation 'com.linkedin.dexmaker:dexmaker:2.25.0'
|
||||||
implementation 'com.takisoft.preferencex:preferencex-simplemenu:1.0.0'
|
implementation 'com.takisoft.preferencex:preferencex-simplemenu:1.0.0'
|
||||||
@@ -96,7 +96,7 @@ dependencies {
|
|||||||
}
|
}
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
androidTestImplementation "androidx.room:room-testing:$roomVersion"
|
androidTestImplementation "androidx.room:room-testing:$roomVersion"
|
||||||
androidTestImplementation 'androidx.test:runner:1.2.0-beta01'
|
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-beta01'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||||
androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.1-beta01'
|
androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.1-beta01'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,6 +191,8 @@ class TetheringFragment : Fragment(), ServiceConnection, Toolbar.OnMenuItemClick
|
|||||||
WifiApManager.configuration = configuration
|
WifiApManager.configuration = configuration
|
||||||
} catch (e: IllegalArgumentException) {
|
} catch (e: IllegalArgumentException) {
|
||||||
SmartSnackbar.make(R.string.configuration_rejected).show()
|
SmartSnackbar.make(R.string.configuration_rejected).show()
|
||||||
|
} catch (e: InvocationTargetException) {
|
||||||
|
SmartSnackbar.make(e.targetException).show()
|
||||||
}
|
}
|
||||||
else -> super.onActivityResult(requestCode, resultCode, data)
|
else -> super.onActivityResult(requestCode, resultCode, data)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,8 +194,13 @@ class WifiApDialogFragment : AlertDialogFragment<WifiApDialogFragment.Arg, WifiA
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
R.id.share_qr -> {
|
R.id.share_qr -> {
|
||||||
QRCodeDialog().withArg(ret.configuration.toQRString())
|
val qrString = try {
|
||||||
.show(fragmentManager ?: return false, "QRCodeDialog")
|
ret.configuration.toQRString()
|
||||||
|
} catch (e: IllegalArgumentException) {
|
||||||
|
SmartSnackbar.make(e).show()
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
QRCodeDialog().withArg(qrString).show(fragmentManager ?: return false, "QRCodeDialog")
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
else -> false
|
else -> false
|
||||||
|
|||||||
@@ -70,9 +70,9 @@ fun frequencyToChannel(frequency: Int) = when (frequency % 5) {
|
|||||||
else -> throw IllegalArgumentException("Invalid frequency $frequency")
|
else -> throw IllegalArgumentException("Invalid frequency $frequency")
|
||||||
}
|
}
|
||||||
|
|
||||||
val WifiConfiguration.apKeyManagement get() = allowedKeyManagement.nextSetBit(0).also { selected ->
|
val WifiConfiguration.apKeyManagement get() = allowedKeyManagement.nextSetBit(0).let { selected ->
|
||||||
check(selected >= 0) { "No key management selected" }
|
|
||||||
check(allowedKeyManagement.nextSetBit(selected + 1) < 0) { "More than 1 key managements supplied" }
|
check(allowedKeyManagement.nextSetBit(selected + 1) < 0) { "More than 1 key managements supplied" }
|
||||||
|
if (selected < 0) WifiConfiguration.KeyMgmt.NONE else selected // getAuthType returns NONE if nothing is selected
|
||||||
}
|
}
|
||||||
|
|
||||||
private val qrSanitizer = Regex("([\\\\\":;,])")
|
private val qrSanitizer = Regex("([\\\\\":;,])")
|
||||||
|
|||||||
Reference in New Issue
Block a user