Initial fixes to support targetSdk 29.
This commit is contained in:
parent
08cfe79625
commit
c63f3edb06
|
@ -3,11 +3,11 @@ apply plugin: 'kotlin-android'
|
|||
apply plugin: 'kotlin-kapt'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
compileSdkVersion 29
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
targetSdkVersion 29
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
|
|
|
@ -19,12 +19,12 @@ androidExtensions {
|
|||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
compileSdkVersion 29
|
||||
testOptions.unitTests.includeAndroidResources = true
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
targetSdkVersion 29
|
||||
versionCode 1
|
||||
versionName "0.0.1"
|
||||
// Multidex is useful for tests
|
||||
|
|
|
@ -68,7 +68,7 @@ internal class ShareSecretCryptoProvider @Inject constructor(
|
|||
|
||||
fun decryptEvent(event: Event): MXEventDecryptionResult {
|
||||
return runBlocking(coroutineDispatchers.crypto) {
|
||||
olmDecryptionFactory.create().decryptEvent(event, ShareSecretCryptoProvider::class.java.name ?: "")
|
||||
olmDecryptionFactory.create().decryptEvent(event, ShareSecretCryptoProvider::class.java.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,8 +25,9 @@ internal class Debouncer(private val handler: Handler) {
|
|||
fun debounce(identifier: String, r: Runnable, millis: Long): Boolean {
|
||||
if (runnables.containsKey(identifier)) {
|
||||
// debounce
|
||||
val old = runnables[identifier]
|
||||
handler.removeCallbacks(old)
|
||||
runnables[identifier]?.let {
|
||||
handler.removeCallbacks(it)
|
||||
}
|
||||
}
|
||||
insertRunnable(identifier, r, millis)
|
||||
return true
|
||||
|
|
|
@ -104,13 +104,13 @@ ext.abiVersionCodes = ["armeabi-v7a": 1, "arm64-v8a": 2, "x86": 3, "x86_64": 4].
|
|||
def buildNumber = System.env.BUILDKITE_BUILD_NUMBER as Integer ?: 0
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
compileSdkVersion 29
|
||||
defaultConfig {
|
||||
applicationId "im.vector.riotx"
|
||||
// Set to API 19 because motionLayout is min API 18.
|
||||
// In the future we may consider using an alternative of MotionLayout to support API 16. But for security reason, maybe not.
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 28
|
||||
targetSdkVersion 29
|
||||
multiDexEnabled true
|
||||
|
||||
// `develop` branch will have version code from timestamp, to ensure each build from CI has a incremented versionCode.
|
||||
|
|
|
@ -84,7 +84,7 @@ fun requestDisablingBatteryOptimization(activity: Activity, fragment: Fragment?,
|
|||
*/
|
||||
fun copyToClipboard(context: Context, text: CharSequence, showToast: Boolean = true, @StringRes toastMessage: Int = R.string.copied_to_clipboard) {
|
||||
val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
|
||||
clipboard.primaryClip = ClipData.newPlainText("", text)
|
||||
clipboard.setPrimaryClip(ClipData.newPlainText("", text))
|
||||
if (showToast) {
|
||||
context.toast(toastMessage)
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ class KeysBackupRestoreFromPassphraseFragment @Inject constructor(): VectorBaseF
|
|||
|
||||
// used just to have default link representation
|
||||
val clickableSpan = object : ClickableSpan() {
|
||||
override fun onClick(widget: View?) {}
|
||||
override fun onClick(widget: View) {}
|
||||
}
|
||||
val start = helperText.indexOf(clickableText)
|
||||
val end = start + clickableText.length
|
||||
|
|
|
@ -440,11 +440,11 @@ class MessageItemFactory @Inject constructor(
|
|||
Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
|
||||
|
||||
spannable.setSpan(object : ClickableSpan() {
|
||||
override fun onClick(widget: View?) {
|
||||
override fun onClick(widget: View) {
|
||||
callback?.onEditedDecorationClicked(informationData)
|
||||
}
|
||||
|
||||
override fun updateDrawState(ds: TextPaint?) {
|
||||
override fun updateDrawState(ds: TextPaint) {
|
||||
// nop
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue