sdmaid-se/app-common-setup
darken 83c4d4e65e General: Subtract the Advanced Protection block from AutomationManager.canSelfEnable
AutomationManager.canSelfEnable() was WRITE_SECURE_SETTINGS alone, while
AutomationSetupModule computed its own value as
`automationManager.canSelfEnable() && !aapmBlocksAcs`. On an Android 17 device
with Advanced Protection active and secure-settings access granted the two
disagreed: useAcs (consent plus running-service-or-canSelfEnable) was true while
the setup module's isComplete was false. Every action gated on useAcs -
AppControl's canForceStop, canArchive and canRestore - was offered and could not
run, because Advanced Protection rejects the accessibility bind itself, so a
secure-settings write does not help.

Both sites now share one predicate, decideCanSelfEnable(hasSecureSettings,
advancedProtectionBlocksAcs), added beside the module's other pure decision
functions in AutomationToolsHelper. The setup module drops its now redundant
`&& !aapmBlocksAcs`; its computed value is unchanged, and the local aapmBlocksAcs
still feeds decideAcsRestrictionHints and isAdvancedProtectionBlocked.

useAcs's first clause, `isServiceEnabled() && isServiceLaunched()`, keeps its
meaning: a service that is genuinely running can genuinely run the task,
whatever Advanced Protection would do to a fresh bind. Only the self-enable
clause is narrowed.
2026-09-15 22:01:36 +02:00
..
src General: Subtract the Advanced Protection block from AutomationManager.canSelfEnable 2026-09-15 22:01:36 +02:00
build.gradle.kts General: Replace Moshi with Kotlin X serialization 2026-03-28 09:17:10 +01:00
consumer-rules.pro General: Fix lint vital issues from module extraction 2026-02-25 22:34:29 +01:00