feat: pair wireless debugging from a notification for the child-process gate (#67)

* feat: pair wireless debugging from a notification for the child-process gate

* fix: pair over loopback, handle Android 12 and 14 child-process routes, use D logo for notifications

* fix: read the adb tls port directly before falling back to mdns

* fix: end pairing on the same notification so progress never lingers
This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-09-28 21:37:10 -04:00
1 parent d647879299
commit 00e8c285ba
10 files changed
+600 -117

No files matched your search

@@ -1,6 +1,8 @@
package com.droiddeck.launcher.core
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
class PhantomProcessLimitTest {
@@ -26,4 +28,33 @@ class PhantomProcessLimitTest {
assertEquals(PhantomProcessStatus.UNSET, PhantomProcessLimit.status(null, null))
assertEquals(PhantomProcessStatus.UNSET, PhantomProcessLimit.status("", ""))
}
@Test
fun android12UsesDeviceConfig() {
assertEquals(
listOf(
"device_config set_sync_disabled_for_tests persistent",
"device_config put activity_manager max_phantom_processes 2147483647",
),
PhantomProcessLimit.shellCommands(enabled = false, sdk = 31),
)
assertTrue(PhantomProcessLimit.verified("2147483647\n", enabled = false, sdk = 31))
assertFalse(PhantomProcessLimit.verified("null", enabled = false, sdk = 31))
}
@Test
fun android12LAndLaterUseTheFlag() {
assertEquals(
listOf("settings put global settings_enable_monitor_phantom_procs false"),
PhantomProcessLimit.shellCommands(enabled = false, sdk = 33),
)
assertTrue(PhantomProcessLimit.verified("false", enabled = false, sdk = 34))
assertFalse(PhantomProcessLimit.verified("null", enabled = false, sdk = 33))
}
@Test
fun developerToggleStartsAtAndroid14() {
assertFalse(PhantomProcessLimit.hasDeveloperToggle(33))
assertTrue(PhantomProcessLimit.hasDeveloperToggle(34))
}
}