From 76a435cb843827fa83508c3fcb6e24a3fa066f49 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Wed, 6 Mar 2019 13:55:26 +0100 Subject: [PATCH] Update deps & fix periodic capability job Signed-off-by: Mario Danic --- app/build.gradle | 54 +++++++++---------- .../application/NextcloudTalkApplication.java | 10 ++-- 2 files changed, 30 insertions(+), 34 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index e4ce9062d..997691aa4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -101,7 +101,7 @@ android { ext { supportLibraryVersion = '28.0.0' - workVersion = "1.0.0-beta02" + workVersion = "1.0.0" } @@ -127,25 +127,25 @@ dependencies { implementation 'androidx.multidex:multidex:2.0.0' - implementation 'io.reactivex.rxjava2:rxandroid:2.1.0' - implementation "io.reactivex.rxjava2:rxjava:2.2.2" + implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' + implementation "io.reactivex.rxjava2:rxjava:2.2.7" implementation 'com.bluelinelabs:conductor:2.1.5' implementation 'com.bluelinelabs:conductor-support:2.1.5' - implementation 'com.squareup.okhttp3:okhttp:3.11.0' - implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.11.0' - implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0' + implementation 'com.squareup.okhttp3:okhttp:3.13.1' + implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.13.1' + implementation 'com.squareup.okhttp3:logging-interceptor:3.13.1' implementation 'com.bluelinelabs:logansquare:1.3.7' annotationProcessor 'com.bluelinelabs:logansquare-compiler:1.3.7' - implementation 'com.squareup.retrofit2:retrofit:2.4.0' - implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0' + implementation 'com.squareup.retrofit2:retrofit:2.5.0' + implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0' implementation 'com.github.aurae.retrofit2:converter-logansquare:1.4.1' - implementation 'com.google.dagger:dagger:2.17' - annotationProcessor 'com.google.dagger:dagger-compiler:2.17' + implementation 'com.google.dagger:dagger:2.21' + annotationProcessor 'com.google.dagger:dagger-compiler:2.21' implementation 'com.github.lukaspili.autodagger2:autodagger2:1.1' annotationProcessor 'com.github.lukaspili.autodagger2:autodagger2-compiler:1.1' @@ -155,33 +155,33 @@ dependencies { implementation 'io.requery:requery:1.5.1' implementation 'io.requery:requery-android:1.5.1' - implementation 'net.zetetic:android-database-sqlcipher:3.5.9' + implementation 'net.zetetic:android-database-sqlcipher:4.0.1' annotationProcessor 'io.requery:requery-processor:1.5.1' - implementation 'org.parceler:parceler-api:1.1.11' - annotationProcessor 'org.parceler:parceler:1.1.11' + implementation 'org.parceler:parceler-api:1.1.12' + annotationProcessor 'org.parceler:parceler:1.1.12' implementation 'net.orange-box.storebox:storebox-lib:1.4.0' - compileOnly "org.projectlombok:lombok:1.18.4" - annotationProcessor "org.projectlombok:lombok:1.18.4" + compileOnly "org.projectlombok:lombok:1.18.6" + annotationProcessor "org.projectlombok:lombok:1.18.6" - implementation 'com.jakewharton:butterknife:10.0.0' - annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0' + implementation 'com.jakewharton:butterknife:10.1.0' + annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0' implementation 'com.github.HITGIF:TextFieldBoxes:1.4.3' implementation 'eu.davidea:flexible-adapter:5.1.0' implementation 'eu.davidea:flexible-adapter-ui:1.0.0' - implementation 'com.github.bumptech.glide:glide:4.8.0' - annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0' - implementation 'com.github.bumptech.glide:okhttp3-integration:4.8.0@aar' - implementation 'com.facebook.fresco:fresco:1.11.0' - implementation 'com.facebook.fresco:animated-webp:1.11.0' - implementation 'com.facebook.fresco:webpsupport:1.11.0' - implementation 'com.facebook.fresco:animated-gif:1.11.0' - implementation "com.facebook.fresco:imagepipeline-okhttp3:1.11.0" + implementation 'com.github.bumptech.glide:glide:4.9.0' + annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' + implementation 'com.github.bumptech.glide:okhttp3-integration:4.9.0@aar' + implementation 'com.facebook.fresco:fresco:1.13.0' + implementation 'com.facebook.fresco:animated-webp:1.13.0' + implementation 'com.facebook.fresco:webpsupport:1.13.0' + implementation 'com.facebook.fresco:animated-gif:1.13.0' + implementation "com.facebook.fresco:imagepipeline-okhttp3:1.13.0" implementation 'org.webrtc:google-webrtc:1.0.23295' implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}" @@ -189,9 +189,9 @@ dependencies { implementation 'com.yarolegovich:lovelyinput:1.0.9' implementation 'com.yarolegovich:mp:1.0.9' - implementation 'me.zhanghai.android.effortlesspermissions:library:1.0.2' + implementation 'me.zhanghai.android.effortlesspermissions:library:1.1.0' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.7' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.8.1' implementation 'com.github.wooplr:Spotlight:1.3' diff --git a/app/src/main/java/com/nextcloud/talk/application/NextcloudTalkApplication.java b/app/src/main/java/com/nextcloud/talk/application/NextcloudTalkApplication.java index 3e1761208..82bf39023 100644 --- a/app/src/main/java/com/nextcloud/talk/application/NextcloudTalkApplication.java +++ b/app/src/main/java/com/nextcloud/talk/application/NextcloudTalkApplication.java @@ -26,6 +26,7 @@ import android.util.Log; import androidx.lifecycle.LifecycleObserver; import androidx.multidex.MultiDex; import androidx.multidex.MultiDexApplication; +import androidx.work.ExistingPeriodicWorkPolicy; import androidx.work.OneTimeWorkRequest; import androidx.work.PeriodicWorkRequest; import androidx.work.WorkManager; @@ -140,21 +141,16 @@ public class NextcloudTalkApplication extends MultiDexApplication implements Lif OneTimeWorkRequest pushRegistrationWork = new OneTimeWorkRequest.Builder(PushRegistrationWorker.class).build(); OneTimeWorkRequest accountRemovalWork = new OneTimeWorkRequest.Builder(AccountRemovalWorker.class).build(); PeriodicWorkRequest periodicCapabilitiesUpdateWork = new PeriodicWorkRequest.Builder(CapabilitiesWorker.class, - 1, TimeUnit.DAYS).build(); + 12, TimeUnit.HOURS).build(); OneTimeWorkRequest capabilitiesUpdateWork = new OneTimeWorkRequest.Builder(CapabilitiesWorker.class).build(); OneTimeWorkRequest signalingSettingsWork = new OneTimeWorkRequest.Builder(SignalingSettingsWorker.class).build(); - //WorkManager.initialize(getApplicationContext(), new Configuration.Builder().build()); WorkManager.getInstance().enqueue(pushRegistrationWork); WorkManager.getInstance().enqueue(accountRemovalWork); WorkManager.getInstance().enqueue(capabilitiesUpdateWork); WorkManager.getInstance().enqueue(signalingSettingsWork); + WorkManager.getInstance().enqueueUniquePeriodicWork("DailyCapabilitiesUpdateWork", ExistingPeriodicWorkPolicy.REPLACE, periodicCapabilitiesUpdateWork); - // There is a bug with periodic work so we ignore this for now - //WorkManager.getInstance().enqueueUniquePeriodicWork("DailyCapabilitiesUpdateWork", - // ExistingPeriodicWorkPolicy.REPLACE, periodicCapabilitiesUpdateWork); - - WorkManager.getInstance().cancelUniqueWork("DailyCapabilitiesUpdateWork"); EmojiManager.install(new TwitterEmojiProvider()); }