Skip to content

Instantly share code, notes, and snippets.

@peterroth
Last active November 22, 2019 13:11
Show Gist options
  • Save peterroth/f4534367660c5b361a2eda47f37e8866 to your computer and use it in GitHub Desktop.
Save peterroth/f4534367660c5b361a2eda47f37e8866 to your computer and use it in GitHub Desktop.
The flowchart of Android Doze; original work is done by Arstoien on XDA Forum: https://forum.xda-developers.com/showpost.php?p=63694133&postcount=532 Chart drawn on http://asciiflow.com/ Def = default value
motion_inactive_to +---------------------+ +------------------------------+ motion_inactive_to
Def: 600 +-------+ While sensing_to: <------+ While idle_after_inactive_to:<---------+ Def:600
| | AnyMotion reported? | | AnyMotion reported? | |
| +---------------------+ +------------------------------+ |
| motion_inactive_to +-------+------------+
| sensing_to Def: 600 | While idle_to: |
+-v-------+ Def: 240 | AnyMotion reported?|
+---> SENSING +-------------+ +-----------------^--+
| +---------+ | | motion_inactive_to
inactive_to | | idle_after_inactive_to idle_to | Def: 600
+-------+ +------------+ Def: 1800 | | +--------+ Def: 1800 +------+ Def: 3600+-----+------------+
|Active +-->Screen OFF+-->+IDLE_PENDING+-------------> +-->Inactive+----------------------------> IDLE +-----------> IDLE_MAINTENANCE |
+-------+ +------------+ | | +--------+ +---^--+ +--------------+---+
| locating_to | | |
| +--------+ Def: 30 | | |
+---->LOCATING+-------------+ | |
+--------+ | +--+-----------------------------v--------------+
| |idle_to*idle_factor (not more than max_idle_to)|
| Skip locating_to |idle_pending_to*idle_pending_factor |
+---------------------------+-------+ |(not more than max_idle_pending_to) |
| While Locating_to: | +-----------------------------------------------+
| found within location_accuracy?|
+-----------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment