From 4d80e35ccef777b60c4ddb2b133811c4ac3c23d1 Mon Sep 17 00:00:00 2001 From: moezbhatti Date: Fri, 25 Oct 2019 02:59:40 -0400 Subject: [PATCH] Upgrade sdk and androidx --- .travis.yml | 4 ++-- build.gradle | 8 ++++---- presentation/build.gradle | 6 +++--- .../java/com/moez/QKSMS/common/util/ClipboardUtils.kt | 4 ++-- .../moez/QKSMS/feature/compose/ComposeActivityModule.kt | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3ea7b7f4..ae7f6a94 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,12 +9,12 @@ notifications: env: global: - - COMPILE_API_LEVEL=27 + - COMPILE_API_LEVEL=29 - EMULATOR_API_LEVEL=24 # It seems emulator levels 25,26,27 from main repos have google_apis by default, and do not support armeabi-v7a. Check commit comment. - EMULATOR_TAG=default # Possible values are default, google_apis, android-tv, android-wear, android-wear-cn - EMULATOR_ABI=armeabi-v7a # Default is armeabi-v7a, possible options are: x86, x86_64, mips, arm64-v8a, armeabi-v7a. Note: check commit comment - EMULATOR_NAME=qksms3 - - ANDROID_BUILD_TOOLS_VERSION=28.0.3 # Match build-tools version used in build.gradle + - ANDROID_BUILD_TOOLS_VERSION=29.0.2 # Match build-tools version used in build.gradle - EMULATOR="system-images;android-${EMULATOR_API_LEVEL};${EMULATOR_TAG};${EMULATOR_ABI}" # Used to install/create emulator android: diff --git a/build.gradle b/build.gradle index 0e7856f0..b24fbe68 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,13 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.androidx_appcompat_version = '1.0.2' + ext.androidx_appcompat_version = '1.1.0' ext.androidx_constraintlayout_version = '1.1.3' - ext.androidx_core_version = '1.0.1' + ext.androidx_core_version = '1.1.0' ext.androidx_emoji_version = '1.0.0' ext.androidx_exifinterface_version = '1.0.0' ext.androidx_testrunner_version = '1.1.0-alpha3' - ext.androidx_viewpager_version = '1.0.0-alpha01' + ext.androidx_viewpager_version = '1.0.0-beta05' ext.autodispose_version = '1.3.0' ext.conductor_version = '2.1.5' ext.coroutines_version = '1.2.2' @@ -17,7 +17,7 @@ buildscript { ext.glide_version = "4.8.0" ext.junit_version = '4.12' ext.kotlin_version = '1.3.31' - ext.lifecycle_version = '2.0.0' + ext.lifecycle_version = '2.1.0' ext.material_version = '1.0.0' ext.mockito_version = '2.18.3' ext.moshi_version = '1.8.0' diff --git a/presentation/build.gradle b/presentation/build.gradle index 2e0adbaf..f2114189 100644 --- a/presentation/build.gradle +++ b/presentation/build.gradle @@ -23,14 +23,14 @@ apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' android { - compileSdkVersion 28 - buildToolsVersion "28.0.3" + compileSdkVersion 29 + buildToolsVersion "29.0.2" flavorDimensions "analytics" defaultConfig { applicationId "com.moez.QKSMS" minSdkVersion 21 - targetSdkVersion 28 + targetSdkVersion 29 versionCode 2202 versionName "3.7.3" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/presentation/src/main/java/com/moez/QKSMS/common/util/ClipboardUtils.kt b/presentation/src/main/java/com/moez/QKSMS/common/util/ClipboardUtils.kt index 53eb0996..6e6e0139 100644 --- a/presentation/src/main/java/com/moez/QKSMS/common/util/ClipboardUtils.kt +++ b/presentation/src/main/java/com/moez/QKSMS/common/util/ClipboardUtils.kt @@ -27,7 +27,7 @@ object ClipboardUtils { fun copy(context: Context, string: String) { val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager val clip = ClipData.newPlainText("SMS", string) - clipboard.primaryClip = clip + clipboard.setPrimaryClip(clip) } -} \ No newline at end of file +} diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeActivityModule.kt b/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeActivityModule.kt index 7bbe34a6..d9b0504a 100644 --- a/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeActivityModule.kt +++ b/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeActivityModule.kt @@ -49,10 +49,10 @@ class ComposeActivityModule { activity.intent.data?.let { val data = it.toString() address = when { - it.scheme.startsWith("smsto") -> data.replace("smsto:", "") - it.scheme.startsWith("mmsto") -> data.replace("mmsto:", "") - it.scheme.startsWith("sms") -> data.replace("sms:", "") - it.scheme.startsWith("mms") -> data.replace("mms:", "") + it.scheme?.startsWith("smsto") == true -> data.replace("smsto:", "") + it.scheme?.startsWith("mmsto") == true -> data.replace("mmsto:", "") + it.scheme?.startsWith("sms") == true -> data.replace("sms:", "") + it.scheme?.startsWith("mms") == true -> data.replace("mms:", "") else -> "" }