Lifecycle
| State | Meaning | Removal |
|---|---|---|
| NOT_OWNER | App installed, not device owner | Normal uninstall |
| UNARMED | Device owner; keys and config may be enrolled; nothing enforced | Instant, from the app |
| ARMED | Policies enforced | Delayed exit only |
| ARMED, with a pending action | A loosening change is counting down | Cancelling it is instant |
The main screen shows these as four stages: Not set up (NOT_OWNER), Almost set up (UNARMED, with no owner key and config yet), Not armed (UNARMED and enrolled) and Armed. Every screen takes its wording from that one stage (SetupStage), so none contradicts another.
quitlock provision takes a phone from nothing to UNARMED with a key and a config enrolled. Arming happens on the phone, never from the computer: the Arm button works only once an owner key and a config are enrolled. It shows a summary of what will be enforced and the delay, and asks for a typed ARM, or for the owner’s phone PIN or password if one is set.
Before arming, the app asks once to be left out of battery optimization, so Doze cannot hold back the checks that turn adb off after a debugging window. Arming goes ahead if the user declines; the self-check then says so, and the Checks and apps screen has a button that asks again.
The phone must be online to arm: setting Private DNS tests the resolver (Enforcement). A release build also refuses to arm without Chrome, the one browser QuitLock manages.
Arming is all or nothing: Private DNS is set first, since it is the step that can fail for outside reasons, and if any later step fails, everything applied so far is undone and the phone stays UNARMED.
From ARMED the only way back is an exit, which waits out the delay (Leaving).