Сравнить коммиты
| Автор | SHA1 | Дата | |
|---|---|---|---|
|
|
3afcfa17d0 | ||
|
|
02263d5fd9 | ||
|
|
a884b2f3d7 | ||
|
|
6910790fa7 | ||
|
|
6cab1a0b36 | ||
|
|
edd4f670fe |
+10
-9
@@ -9,8 +9,8 @@ android {
|
||||
buildConfigField 'boolean', 'HIDDEN_APP', 'false'
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 30
|
||||
versionCode 69
|
||||
versionName '6.8'
|
||||
versionCode 71
|
||||
versionName '6.10'
|
||||
multiDexEnabled true
|
||||
}
|
||||
|
||||
@@ -51,15 +51,16 @@ dependencies {
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
implementation 'androidx.preference:preference-ktx:1.1.1'
|
||||
implementation 'androidx.test:core-ktx:1.4.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
testImplementation 'org.robolectric:robolectric:4.1'
|
||||
googleImplementation 'com.google.firebase:firebase-core:19.0.0'
|
||||
googleImplementation 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
|
||||
googleImplementation 'com.google.firebase:firebase-analytics:19.0.0'
|
||||
googleImplementation 'com.google.android.gms:play-services-location:18.0.0'
|
||||
googleImplementation 'com.google.android.play:core:1.10.0'
|
||||
implementation "androidx.core:core-ktx:1.6.0"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
testImplementation 'org.robolectric:robolectric:4.1'
|
||||
googleImplementation platform('com.google.firebase:firebase-bom:28.2.1')
|
||||
googleImplementation 'com.google.firebase:firebase-core'
|
||||
googleImplementation 'com.google.firebase:firebase-analytics'
|
||||
googleImplementation 'com.google.firebase:firebase-crashlytics'
|
||||
googleImplementation 'com.google.android.gms:play-services-location:18.0.0'
|
||||
googleImplementation 'com.google.android.play:core:1.10.0'
|
||||
}
|
||||
|
||||
if (getGradle().getStartParameter().getTaskRequests().toString().contains('Google')) {
|
||||
|
||||
@@ -24,11 +24,6 @@ import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.app.Activity
|
||||
|
||||
import androidx.annotation.NonNull
|
||||
|
||||
|
||||
|
||||
|
||||
open class MainApplication : MultiDexApplication() {
|
||||
|
||||
override fun onCreate() {
|
||||
|
||||
@@ -49,7 +49,7 @@ class TrackingService : Service() {
|
||||
stopForeground(true)
|
||||
}
|
||||
|
||||
override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
stopSelfResult(startId)
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
@@ -83,7 +83,7 @@ class TrackingService : Service() {
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.ECLAIR)
|
||||
override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
WakefulBroadcastReceiver.completeWakefulIntent(intent)
|
||||
return START_STICKY
|
||||
}
|
||||
|
||||
@@ -51,8 +51,8 @@ abstract class WakefulBroadcastReceiver : BroadcastReceiver() {
|
||||
}
|
||||
}
|
||||
|
||||
fun completeWakefulIntent(intent: Intent): Boolean {
|
||||
val id = intent.getIntExtra(EXTRA_WAKE_LOCK_ID, 0)
|
||||
fun completeWakefulIntent(intent: Intent?): Boolean {
|
||||
val id = intent?.getIntExtra(EXTRA_WAKE_LOCK_ID, 0) ?: 0
|
||||
if (id == 0) {
|
||||
return false
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user