diff --git a/ShortsBlocker/app/build.gradle b/ShortsBlocker/app/build.gradle index fa1cd07..a5fc260 100644 --- a/ShortsBlocker/app/build.gradle +++ b/ShortsBlocker/app/build.gradle @@ -11,8 +11,8 @@ android { applicationId "com.shortsBlocker" minSdk 21 targetSdk 34 - versionCode 9 - versionName "1.0.8" + versionCode 10 + versionName "1.0.9" } buildTypes { diff --git a/ShortsBlocker/app/src/main/java/com/shortsBlocker/service/ShortsAccessibilityService.kt b/ShortsBlocker/app/src/main/java/com/shortsBlocker/service/ShortsAccessibilityService.kt index aa32d6b..7dc9b61 100644 --- a/ShortsBlocker/app/src/main/java/com/shortsBlocker/service/ShortsAccessibilityService.kt +++ b/ShortsBlocker/app/src/main/java/com/shortsBlocker/service/ShortsAccessibilityService.kt @@ -71,13 +71,17 @@ class ShortsAccessibilityService : AccessibilityService() { // counters surfaced in the debug card. private val SHORTS_FRAGMENTS = listOf("reel", "shorts") - // Player-container keywords. The strict class rule fires only when - // a class name contains a SHORTS_FRAGMENT *and* one of these in - // the same name — that distinguishes the player container from - // the tab button or other Shorts-aware UI on home screen. - private val PLAYER_CONTAINER_FRAGMENTS = listOf( - "player", "pager", "recycler", "container" - ) + // Player keyword. The strict class rule fires only when a class + // name contains a SHORTS_FRAGMENT *and* this in the same name — + // narrows detection to the full-screen Shorts player, since + // every relevant YouTube class has "Player" in its name there. + // + // Earlier versions also matched "container" / "recycler" / + // "pager", but those words appear on the Shorts *shelf* embedded + // in the Subscriptions and "You" feeds, which caused those tabs + // to be back-pressed away as soon as they loaded. Restricting + // to "player" alone keeps shelves out of the trigger set. + private val PLAYER_CONTAINER_FRAGMENTS = listOf("player") // Vertical scroller class signatures, corroborates the weak // "shorts text" rule. diff --git a/ShortsBlocker/app/src/main/res/xml/accessibility_service_config.xml b/ShortsBlocker/app/src/main/res/xml/accessibility_service_config.xml index b67d82f..b28cb99 100644 --- a/ShortsBlocker/app/src/main/res/xml/accessibility_service_config.xml +++ b/ShortsBlocker/app/src/main/res/xml/accessibility_service_config.xml @@ -1,16 +1,21 @@