Skip to content

Commit

Permalink
fix: send permission revoked message only when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
jd1378 committed Jul 19, 2024
1 parent e45442d commit 560e9a2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions app/src/main/java/io/github/jd1378/otphelper/BootReceiver.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package io.github.jd1378.otphelper
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.os.Build
import android.util.Log
import io.github.jd1378.otphelper.NotificationListener.Companion.isNotificationListenerServiceEnabled
import io.github.jd1378.otphelper.NotificationListener.Companion.tryReEnableNotificationListener
Expand All @@ -22,12 +21,8 @@ class BootReceiver : BroadcastReceiver() {
)
}
tryReEnableNotificationListener(context)
}
when (Build.VERSION.SDK_INT) {
Build.VERSION_CODES.Q,
Build.VERSION_CODES.R -> {
NotificationHelper.sendPermissionRevokedNotif(context)
}
} else {
NotificationHelper.sendPermissionRevokedNotif(context)
}
}
}
Expand Down

0 comments on commit 560e9a2

Please sign in to comment.