From 01ff371f350afce940a7147824261a9052ad53a3 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Wed, 26 Feb 2020 11:09:56 +0100 Subject: [PATCH] Clean up Signed-off-by: Mario Danic --- .../firebase/MagicFirebaseMessagingService.kt | 41 ------------------- .../talk/newarch/local/models/UserNgEntity.kt | 2 +- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 +- 4 files changed, 4 insertions(+), 45 deletions(-) diff --git a/app/src/gplay/java/com/nextcloud/talk/services/firebase/MagicFirebaseMessagingService.kt b/app/src/gplay/java/com/nextcloud/talk/services/firebase/MagicFirebaseMessagingService.kt index 4abfbe36b..20b7cf9a7 100644 --- a/app/src/gplay/java/com/nextcloud/talk/services/firebase/MagicFirebaseMessagingService.kt +++ b/app/src/gplay/java/com/nextcloud/talk/services/firebase/MagicFirebaseMessagingService.kt @@ -84,45 +84,4 @@ class MagicFirebaseMessagingService : FirebaseMessagingService(), KoinComponent incomingCallIntent.putExtra(BundleKeys.KEY_ENCRYPTED_SIGNATURE, remoteMessage.data["signature"]) applicationContext.startService(incomingCallIntent) } - - @SuppressLint("LongLogTag") - - private fun checkIfCallIsActive(signatureVerification: SignatureVerification, decryptedPushMessage: DecryptedPushMessage) { - /*val ncApi = retrofit.newBuilder().client(okHttpClient.newBuilder().cookieJar(JavaNetCookieJar(CookieManager())).build()).build().create(NcApi::class.java) - var hasParticipantsInCall = false - var inCallOnDifferentDevice = false - - ncApi.getPeersForCall(ApiUtils.getCredentials(signatureVerification.userEntity.username, signatureVerification.userEntity.token), - ApiUtils.getUrlForParticipants(signatureVerification.userEntity.baseUrl, - decryptedPushMessage.id)) - .subscribeOn(Schedulers.io()) - .subscribe(object : Observer { - override fun onSubscribe(d: Disposable) { - } - - override fun onNext(participantsOverall: ParticipantsOverall) { - val participantList: List = participantsOverall.ocs.data - for (participant in participantList) { - if (participant.participantFlags != Participant.ParticipantFlags.NOT_IN_CALL) { - hasParticipantsInCall = true - if (participant.userId == signatureVerification.userEntity.userId) { - inCallOnDifferentDevice = true - break - } - } - } - - if (!hasParticipantsInCall || inCallOnDifferentDevice) { - stopForeground(true) - } else if (isServiceInForeground) { - checkIfCallIsActive(signatureVerification, decryptedPushMessage) - } - } - - override fun onError(e: Throwable) {} - override fun onComplete() { - } - })*/ - - } } \ No newline at end of file diff --git a/app/src/main/java/com/nextcloud/talk/newarch/local/models/UserNgEntity.kt b/app/src/main/java/com/nextcloud/talk/newarch/local/models/UserNgEntity.kt index 1e95665de..549950645 100644 --- a/app/src/main/java/com/nextcloud/talk/newarch/local/models/UserNgEntity.kt +++ b/app/src/main/java/com/nextcloud/talk/newarch/local/models/UserNgEntity.kt @@ -39,7 +39,7 @@ import java.util.* @Serializable @Entity(tableName = "users") data class UserNgEntity( - @PrimaryKey(autoGenerate = true) @ColumnInfo(name = "id") var id: Long = 0, + @PrimaryKey(autoGenerate = true) @ColumnInfo(name = "id") var id: Long, @ColumnInfo(name = "user_id") var userId: String, @ColumnInfo(name = "username") var username: String, @ColumnInfo(name = "base_url") var baseUrl: String, diff --git a/build.gradle b/build.gradle index 7913d8ac7..cc56c745a 100644 --- a/build.gradle +++ b/build.gradle @@ -36,7 +36,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:4.0.0-alpha09' + classpath 'com.android.tools.build:gradle:4.0.0-beta01' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}" classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 918ae19f6..aa307b2a4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Jan 30 21:22:08 CET 2020 +#Wed Feb 26 11:00:50 CET 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-rc-1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip