mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 04:46:08 +00:00
fix: read Settings.Global phantom process flag on Android 12 (SDK 31) (#955)
On Android 12 (SDK 31), read() only checked the android12-off preference written by in-app Wireless ADB, so disabling phantom process monitoring over USB ADB left the status as UNREADABLE. Also write settings_enable_monitor_phantom_procs in the SDK 31 shell commands and accept a disabled Settings.Global / fflag value in read(). Co-authored-by: ovurrsl <ovurrsl@users.noreply.github.com>
This commit is contained in:
1 parent
d269f26604
commit
9db3b7a20b
2 files changed
+18
-1
No files matched your search
@@ -35,11 +35,17 @@ class PhantomProcessLimitTest {
|
||||
listOf(
|
||||
"device_config set_sync_disabled_for_tests persistent",
|
||||
"device_config put activity_manager max_phantom_processes 2147483647",
|
||||
"settings put global settings_enable_monitor_phantom_procs false",
|
||||
),
|
||||
PhantomProcessLimit.shellCommands(enabled = false, sdk = 31),
|
||||
)
|
||||
assertTrue(PhantomProcessLimit.verified("2147483647\n", enabled = false, sdk = 31))
|
||||
assertFalse(PhantomProcessLimit.verified("null", enabled = false, sdk = 31))
|
||||
assertEquals(PhantomProcessStatus.DISABLED, PhantomProcessLimit.android12Status(true, null, null))
|
||||
assertEquals(PhantomProcessStatus.DISABLED, PhantomProcessLimit.android12Status(false, "false", null))
|
||||
assertEquals(PhantomProcessStatus.DISABLED, PhantomProcessLimit.android12Status(false, null, "0"))
|
||||
assertEquals(PhantomProcessStatus.UNREADABLE, PhantomProcessLimit.android12Status(false, null, null))
|
||||
assertEquals(PhantomProcessStatus.UNREADABLE, PhantomProcessLimit.android12Status(false, "true", null))
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in new issue
Block a user