Skip to content
Commit 27b33306 authored by Koji Fukui's avatar Koji Fukui Committed by Akira Numata
Browse files

Transit to correct state after alarm is fired

Symptom:
When AlarmClock fires in IDLE, state is changed to ACTIVE.
But the ACTIVE state continues under some conditions.

Root cause:
Transition from IDLE state to ACTIVE state when AlarmClock fires
1.	Send ACTION_STEP_IDLE_STATE intent
2.	Calles onReceive() in BroadcastReceiver
3.	Calles stepIdleStateLocked()
4.	Calles becomeActiveLocked() 

Check point (1) to change from ACTIVE state to INACTIVE
(Display On -> Off)
1.	onDisplayChanged()
2.	updateDisplayLocked()
3.	becomeInactiveIfAppropriateLocked()

Check point (2) to change from ACTIVE state to INACTIVE
(charging -> not charging)
1.	ACTION_BATTERY_CHANGED
2.	updateChargingLocked()
3.	becomeInactiveIfAppropriateLocked()

There are only two check points to change from ACTIVE to INACTIVE.
If state transition, from IDLE to ACTIVE,
happened by AlarmClock when display is off and not charging,
ACTIVE state will be kept and never changes to INACTIVE state.

Change-Id: I93398366307f529b9c0074ac58b19ad6e4695790
parent 026a5847
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment