No need for an id, can use ordinal.
This commit is contained in:
parent
b64a46738e
commit
6f13feed13
1 changed files with 4 additions and 4 deletions
|
|
@ -33,7 +33,7 @@ object NotificationIdProvider {
|
|||
}
|
||||
|
||||
fun getForegroundServiceNotificationId(type: ForegroundServiceType): Int {
|
||||
return type.id * 10 + FOREGROUND_SERVICE_NOTIFICATION_ID
|
||||
return type.ordinal * 10 + FOREGROUND_SERVICE_NOTIFICATION_ID
|
||||
}
|
||||
|
||||
private fun getOffset(sessionId: SessionId): Int {
|
||||
|
|
@ -50,7 +50,7 @@ object NotificationIdProvider {
|
|||
private const val FOREGROUND_SERVICE_NOTIFICATION_ID = 4
|
||||
}
|
||||
|
||||
enum class ForegroundServiceType(val id: Int) {
|
||||
INCOMING_CALL(1),
|
||||
ONGOING_CALL(2),
|
||||
enum class ForegroundServiceType {
|
||||
INCOMING_CALL,
|
||||
ONGOING_CALL,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue