mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-21 12:08:29 +00:00
Prevent file transfer notification being still displayed after all transfer have ended
This commit is contained in:
parent
5a7872222d
commit
8a1d88c4b5
1 changed files with 5 additions and 3 deletions
|
|
@ -121,6 +121,10 @@ class CoreFileTransferService : FileTransferService() {
|
||||||
Log.i(
|
Log.i(
|
||||||
"$TAG [$downloadingFilesCount] file(s) being downloaded, [$uploadingFilesCount] file(s) being uploaded"
|
"$TAG [$downloadingFilesCount] file(s) being downloaded, [$uploadingFilesCount] file(s) being uploaded"
|
||||||
)
|
)
|
||||||
|
if (downloadingFilesCount == 0 && uploadingFilesCount == 0) {
|
||||||
|
Log.i("$TAG No more files being transferred, do not alter the notification")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val downloadText = resources.getQuantityString(
|
val downloadText = resources.getQuantityString(
|
||||||
R.plurals.notification_file_transfer_download,
|
R.plurals.notification_file_transfer_download,
|
||||||
|
|
@ -141,10 +145,8 @@ class CoreFileTransferService : FileTransferService() {
|
||||||
)
|
)
|
||||||
} else if (downloadingFilesCount > 0) {
|
} else if (downloadingFilesCount > 0) {
|
||||||
downloadText
|
downloadText
|
||||||
} else if (uploadingFilesCount > 0) {
|
|
||||||
uploadText
|
|
||||||
} else {
|
} else {
|
||||||
getString(R.string.notification_file_transfer_startup_message)
|
uploadText
|
||||||
}
|
}
|
||||||
|
|
||||||
mServiceNotification = builder.setContentText(message).build()
|
mServiceNotification = builder.setContentText(message).build()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue