Commit Graph

6 Commits

Author SHA1 Message Date
Ed Coyne
a9dab511de Fix check for null at wrong level of indirection.
Bug: 76146267
Test: builds
Change-Id: I6f7a7c209585e24c3e7bde964b902c3a1567936a
2018-03-26 15:32:32 -07:00
David Pursell
54a8fe4bbe iot: extract boot parameter logic.
Currently the boot parameters are tied pretty tightly to the bootaction
functionality, but volume and brightness need to be set on the
bootanimation regardless of whether there's a bootaction or not.

Extract boot parameters into a separate class to make it easier to apply
volume/brightness in a future CL.

Bug: 65462981
Test: Manual test, can succesfully read params on boot.
Change-Id: I32daad64cb8aab39fcd0ca17503218e0605ccd27
(cherry picked from commit f78561e7bbe580d0f0dbca7a615c575973ef6ce4)
2017-10-02 17:52:24 -07:00
David Pursell
1ecfdbda28 iot bootaction: use libandroidthings types.
We now provide some parameters that can be set on reboot and passed into
the bootaction library. This becomes part of the public libandroidthings
native API, so we need to use the public type.

Bug: 65462981
Test: `mma` builds successfully
Test: Test bootaction.so can receive boot params (tested on nyc-iot-dev)
Change-Id: Ibf6548730e0bac023f6a0a3aef925b0938418a10
2017-09-27 16:24:44 -07:00
Braden Kell
6dd64f3a1a Pass saved parameters to boot action
Bug: http://b/65462981
Test: Parameters in next_boot.json are passed to
      boot action; next_boot.json is moved to
      last_boot.json to allow reading by
      DeviceManagementService.

Change-Id: Ie290711ea48a3a221cfad2e9266215b76631ecbd
2017-09-25 17:53:52 -07:00
Ed Coyne
428ed51fce Change BootActions to use oem.props.
Use /oem/oem.props to configure what the library name for the boot
action
will be, expect that library to be found in /oem/lib

Bug: 62090281
Test: Ran locally against an imx7d, reads oem.props, finds, and loads
library.

Change-Id: I13c161e140747091595efa36f76297ba92cdfa4d
2017-08-15 15:04:14 -07:00
Ed Coyne
7464ac9bd7 Allow IO During boot process, BootActions.
NOTE: this is only compiled into products with PRODUCT_IOT=true.

Introduce BootActions that a developer can provide to manipulate IO
before the android framework comes up on boot.

We will look for a configuration file at /oem/app/etc/boot_action.conf and
expect it to tell us the name of a shared library. We will then fetch
this library from /oem/app/lib/${arch}/ and load it. We expect it to export
boot_action_init(), boot_action_shutdown(), and optionally
boot_action_start_part(int partNumber, int playNumber).

We will then call boot_action_init() during boot after PeripheralManager
is up and call boot_action_shutdown() when the android framework is up
and we are going to start loading APKs.

We will also call boot_action_start_part(*) when each part of the boot
animation is started, use this if you want to synchronize the boot
action and the boot animation.

Boot actions run in a restricted environment and in general can only
make calls to PeripheralManager.

Bug: 37992717
Test: Pushed to local imx7d to test boot actions, pushed to bullhead test that animation+sound still works.
Change-Id: I9e53a17567f8028ea84486d637e1d231ee1125e1
2017-06-19 17:27:08 -07:00