Skip to content

Instantly share code, notes, and snippets.

@cmj
Created February 14, 2026 13:38
Show Gist options
  • Select an option

  • Save cmj/8931a7ab2be5aa2eb5c22a4e14744451 to your computer and use it in GitHub Desktop.

Select an option

Save cmj/8931a7ab2be5aa2eb5c22a4e14744451 to your computer and use it in GitHub Desktop.
vibe check
$ grep -P "[^\x00-\x7F]" 624.patch
+            Log.d(LOG_TAG, "Service created in PAUSED state → stopping self")
+        setUserPaused(applicationContext, true)   // ⭐ TRUE FIX
+            // 1️⃣ Mark paused FIRST (single source of truth)
+                // 2️⃣ Stop all discovery providers
+                // 3️⃣ Disconnect every connected device (THIS fixes PC still connected)
+                // 4️⃣ Remove foreground notification
+                // 5️⃣ Stop the service lifecycle
+            // 6️⃣ Extra safety: ask Android to stop it too
+            // 7️⃣ Clear static reference
+        // User opened the app → resume service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment