Refactor car mode.

Extract all UI behavior from dock observer and ACTION_DOCK_EVENT.

Also introduce a desk type to go along with the car type all through
the resource system, since we now need to have corresponding high-level
broadcasts for desk dock mode.  As part of that I also reworked some
of the logic for switching modes to all funnel through a single
update() call that looks all of the current state to decide what to
do next, and fixed various locking issues.

In addition I found there were bugs in the configuration change
handling causing us to only switch into the car mode config and
then never get out of it.  Unfortunately now that we are actually
changing the configuration for each mode change, the transitions
between them are really crummy as we restart all kinds of
activities. :(
This commit is contained in:
Dianne Hackborn 2010-03-04 18:41:49 -08:00 committed by Alex Ray
parent 8b51a1a88b
commit 70592f2c47
1 changed files with 2 additions and 1 deletions

View File

@ -946,7 +946,8 @@ struct ResTable_config
MASK_UI_MODE_TYPE = 0x0f,
UI_MODE_TYPE_ANY = 0x00,
UI_MODE_TYPE_NORMAL = 0x01,
UI_MODE_TYPE_CAR = 0x02,
UI_MODE_TYPE_DESK = 0x02,
UI_MODE_TYPE_CAR = 0x03,
// uiMode bits for the night switch.
MASK_UI_MODE_NIGHT = 0x30,