Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yostyle committed Nov 16, 2024
1 parent d7172b5 commit 52ab520
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.core.extensions.startForegroundCompat
import im.vector.app.core.services.VectorAndroidService
import im.vector.app.features.notifications.NotificationUtils
import im.vector.lib.core.utils.timer.Clock
import javax.inject.Inject

@AndroidEntryPoint
class MicrophoneAccessService : VectorAndroidService() {

@Inject lateinit var notificationUtils: NotificationUtils
@Inject lateinit var clock: Clock
private val binder = LocalBinder()

override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
Expand All @@ -38,7 +40,7 @@ class MicrophoneAccessService : VectorAndroidService() {
}

private fun showMicrophoneAccessNotification() {
val notificationId = System.currentTimeMillis().toInt()
val notificationId = clock.epochMillis().toInt()
val notification = notificationUtils.buildMicrophoneAccessNotification()
startForegroundCompat(notificationId, notification)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ class VectorCallActivity :
private fun startMicrophoneService() {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO)
== PackageManager.PERMISSION_GRANTED) {

// Only start the service if the app is in the foreground
if (isAppInForeground()) {
Timber.tag(loggerTag.value).v("Starting microphone foreground service")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ class VectorCallActivity :
private fun startMicrophoneService() {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO)
== PackageManager.PERMISSION_GRANTED) {

// Only start the service if the app is in the foreground
if (isAppInForeground()) {
Timber.tag(loggerTag.value).v("Starting microphone foreground service")
Expand Down

0 comments on commit 52ab520

Please sign in to comment.