Skip to content

How does Torchie work?

Merbin J Anselm edited this page Feb 18, 2016 · 4 revisions

Flow Chart

##In Lock screen and Screen On The 'Torchie Quick' accessibility service captures 'Key Events' and filters that of 'Volume Keys'. By doing & operation, toggle torch function is called. See VolumeKeyManager.java

##In Screen Off At screen off, 'Torchie Quick' starts playing a zero-volume music to keep the processor awake (see TorchieWakelock.java). Zero-volume music is played because holding just Wakelock alone does not broadcast any KeyEvent or VOLUME_CHANGED_ACTION intent. Then, by listening to volume changes (not the key presses), toggle torch function is called. See VolumeRockerManager.java

Clone this wiki locally