Skip to content

Commit 2339c75

Browse files
authored
fix: dont check whitelist for routines
1 parent 1c4bbd1 commit 2339c75

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Reef/src/main/java/dev/pranav/reef/accessibility/BlockerService.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ class BlockerService: AccessibilityService() {
5656
val pkg = event.packageName?.toString() ?: return
5757

5858
if (pkg == packageName) return
59-
if (Whitelist.isWhitelisted(pkg)) return
6059

6160
if (prefs.getBoolean("focus_mode", false)) {
61+
if (Whitelist.isWhitelisted(pkg)) return
6262
Log.d("BlockerService", "Blocking $pkg in focus mode")
6363
performGlobalAction(GLOBAL_ACTION_HOME)
6464
showFocusModeNotification(pkg)
@@ -67,6 +67,7 @@ class BlockerService: AccessibilityService() {
6767

6868
val blockReason = UsageTracker.checkBlockReason(this, pkg)
6969
if (blockReason == UsageTracker.BlockReason.NONE) return
70+
if (blockReason != UsageTracker.BlockReason.ROUTINE_LIMIT && Whitelist.isWhitelisted(pkg)) return
7071

7172
Log.d("BlockerService", "Blocking $pkg due to ${blockReason.name}")
7273
performGlobalAction(GLOBAL_ACTION_HOME)

0 commit comments

Comments
 (0)