mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 20:49:36 +01:00
Clean up
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
2763283ef0
commit
01ff371f35
@ -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<ParticipantsOverall> {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
override fun onNext(participantsOverall: ParticipantsOverall) {
|
||||
val participantList: List<Participant> = 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() {
|
||||
}
|
||||
})*/
|
||||
|
||||
}
|
||||
}
|
@ -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,
|
||||
|
@ -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"
|
||||
|
||||
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user