forked from upstream-mirrors/quik
fixed ~~all~~ most of the ~~things~~ errors - it compiles now
This commit is contained in:
+15
-5
@@ -31,7 +31,7 @@ android {
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 23
|
||||
minSdk 26
|
||||
targetSdkVersion 33
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@@ -63,8 +63,10 @@ dependencies {
|
||||
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
|
||||
kapt "com.google.dagger:dagger-compiler:$dagger_version"
|
||||
//Resolve jdk8+ Generation Annotations - javax annotation does not exist
|
||||
compileOnly 'com.github.pengrad:jdk9-deps:1.0'
|
||||
// compileOnly "javax.annotation:jsr250-api:1.0"
|
||||
implementation 'com.github.pengrad:jdk9-deps:1ffe84c468'
|
||||
|
||||
// look into jakarta.annotation-api when switching to java 9
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
|
||||
// rxjava
|
||||
implementation "io.reactivex.rxjava2:rxandroid:$rxandroid_version"
|
||||
@@ -85,12 +87,12 @@ dependencies {
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-rx2:$coroutines_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-reactive:$coroutines_version"
|
||||
|
||||
implementation 'com.callcontrol:datashare:1.2.0'
|
||||
implementation 'com.callcontrol:datashare:1.3.0'
|
||||
implementation "com.f2prateek.rx.preferences2:rx-preferences:$rx_preferences_version"
|
||||
implementation "com.jakewharton.timber:timber:$timber_version"
|
||||
implementation "com.squareup.moshi:moshi:$moshi_version"
|
||||
implementation "com.squareup.okhttp3:okhttp:$okhttp3_version"
|
||||
implementation 'io.michaelrocks:libphonenumber-android:8.10.16'
|
||||
implementation 'io.michaelrocks:libphonenumber-android:8.13.47'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation project(":android-smsmms")
|
||||
implementation project(':common')
|
||||
@@ -101,5 +103,13 @@ dependencies {
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url 'https://maven.google.com' }
|
||||
maven {
|
||||
name 'glide-snapshot'
|
||||
url 'https://oss.sonatype.org/content/repositories/snapshots'
|
||||
}
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
@@ -16,4 +16,7 @@
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<manifest />
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
</manifest>
|
||||
|
||||
@@ -31,7 +31,18 @@ class SubscriptionManagerCompat @Inject constructor(context: Context, private va
|
||||
|
||||
val activeSubscriptionInfoList: List<SubscriptionInfoCompat>
|
||||
get() {
|
||||
return subscriptionManager?.activeSubscriptionInfoList?.map { SubscriptionInfoCompat(it) } ?: listOf()
|
||||
return if (permissions.hasPhone()) {
|
||||
try {
|
||||
subscriptionManager?.activeSubscriptionInfoList?.map {
|
||||
SubscriptionInfoCompat(it)
|
||||
} ?: listOf()
|
||||
} catch (e: SecurityException) {
|
||||
// Handle exception if permission is not granted
|
||||
listOf()
|
||||
}
|
||||
} else {
|
||||
listOf()
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
|
||||
Reference in New Issue
Block a user