android-console: Fix goldfish audio misnaming

Replaced goldfish_audio misnaming to goldfish_battery where appropriate in
goldfish_battery.c

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
android-console: Fix OK message output

Adjusted "OK" message to be shared by all cases to avoid duplicates and
need for all help output to print.  Alse added missing "OK" after the top
most help output.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
android-console: Remove extra redir help message

Removed an extraneous message in the redir command help.  The message is not
part of the standard Android emulator output.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
android-console: Consolidate redir help text

Consolidated the Android emulator console help text for the redir command to
make the hndler functions more readable.  This establishes the pattern to be
used for each command added in the future.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
android-console: Add console base power command

Added the base Android emulator console power command and infrastructure for
adding sub-commands.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
android-console: Add missing hw_has_battery prop

Added the missing hw_has_battery property to the Goldfish batter state.  This
property indicates whether the device has a battery and controls whether some
power commands are available.

In the Android emulator this property is acquired from the AVD for the device.
For now, this is wired as always enabled.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
android-console: Init the battery ID state field

Adds initialization of the battery ID field so that it is discoverable by name
(ID) when needed by power commands.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
android-console: Add header for battery externs

Added goldfish_battery.h to share power and battery constants and externs
between the Goldfish battery code and the Android console code.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
android-console: Add GF battery prop print func

Add a function for printing out the Goldfish battery properties to the android
console.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
android-console: Add GF battery property getter

Add a function for acquiring each of the goldfish battery properties.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
android-console: Add power display command

Add the Android emulator console "power display" along with the associated help
messages.  The "display" command allows the current device power and battery state
to be displayed.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
android-console: Add power ac command

Add the Android emulator console "power ac" along with the associated help
messages.  The "ac" command allows the power supply state of the device to be
manipulated.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>

---

v2 -> v3
- Add missing "OK" messages
android-console: Add power status command

Add the Android emulator console "power status" command and associated help
messages.  The "status" command allows the battery status of the device to be
manipulated.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>

---

v2 -> v3
- Add missing "OK" messages
android-console: Add power present command

Add the Android emulator console "power present" command and associated help
messages.  The "present" command allows the battery presence in the device to be
manipulated.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>

---

v2 -> v3
- Add missing "OK" messages
android-console: Add power health command

Add the Android emulator console "power health" command and associated help
messages.  The "health" command allows the battery health of the device to be
manipulated.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>

---

v2 -> v3
- Add missing "OK" messages
android-console: Add power capacity command

Add the Android emulator console "power capacity" command along associated help
messages.  The "capacity" command allows the battery capacity of the device to
be manipulated.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>

---

v2 -> v3
- Add missing "OK" messages
android-console: Add console base event command

Add the base Android emulator console "event" command and infrastructure for
adding sub-commands.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
android-console: Init the event device ID field

Initializes the Goldfish event device ID field so that it is discoverable by
name (ID) when needed by the event commands.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
android-console: Add GF event type reporting

Adds Goldfish event table and functions for reporting the number. value, and
names of supported events.  Also added an internal function for looking up an
event type descriptor by name.  This functionality will be used by the Andorid
emulator console for displaying names and numbers of available events.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
android-console: Add GF event type code reporting

Adds Goldfish event code tables and functions for reporting the number, value
and names of supported codes for a given event type.  Also added an internal
function for looking up an event code descriptor from its name.  This
functionality will be used by the Andorid emulator console for displaying
names and numbers of available events codes.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>