Commit Graph

187 Commits

Author SHA1 Message Date
Miguel de Dios
b717e8e8c2 bootanimation: Change bootanim ioprio to highest in IOPRIO_CLASS_RT
We see cases where bootanim is IO sleeping on boot and its causing
jank. Change the ioprio to the highest in an attempt to reduce this.

Bug: 138459662
Test: manual - flash and factory reset, looking for artifacts in the boot animation
Change-Id: I9734edea37c92e365a2b359a5180303e9b9284f7
2019-08-09 14:06:42 -07:00
Anders Fridlund
e0b4d23708 Look for bootanimation in apex-module
Look for bootanimation.zip in /apex/com.android.bootanimation/etc/.
This is needed to support download and install of customized bootanimations.

Bug: 116821733
Test:
1. Get a custom bootanimation.zip
2. Build a com.android.bootanimation.apex that contains the custom
   bootanimation.
3. Build a product partition containing the public avb-key in
   /product/etc/security/apex/ or a system partition containing the
   public avb-key in /system/product/etc/security/apex/
4. Flash the partition that was built.
5. $ adb install com.android.bootanimation.apex
6. $ adb reboot
7. Verify that the custom bootanimation is used during boot.

Change-Id: I0b63e8dd2ba536a5077e34f63670025f6e9d791a
2019-05-29 13:45:19 -07:00
Beverly
34ffe253ce Write system property persist.sys.provisioned
When the device is provisioned, write a system property
to indicate device provisioned.

Test: manual
Bug: 131702833
Change-Id: I7ade97770658b3aa67d642446dd66c410ec4c5a3
2019-05-20 18:21:29 -04:00
Yi Kong
911ac2394e [BootAnimation] Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.

Test: m
Bug: 68236239
Change-Id: I3d1d08ce91b351227dad11f0ac0302832b9563b4
2019-03-24 01:49:02 -07:00
Jiyong Park
aff455f278 Merge "Revert^3 "Delay start of bootanimation until after the Runtime APEX is mounted."" am: 1a14dedcce am: 6623e402b3
am: 1c64a73f91

Change-Id: I1cf5a65959d3a2d4cba292c532afddebf58d9683
2019-03-12 16:50:26 -07:00
Jiyong Park
552ad7b7f1 Revert^3 "Delay start of bootanimation until after the Runtime APEX is mounted."
This reverts commit a6bb8916b0.

Bootanim doesn't need to be delayed because the APEXes from the system partition are now
activated very early in the boot sequence (far before bootanim is started).

See https://android-review.googlesource.com/q/topic:%22apex_earlymount_base%22+(status:open%20OR%20status:merged)

Bug: 125549215
Test: bootanim is started without being delayed
Change-Id: I367b1a5c6bf08dad770cd2bf7f6d67dbf1a813e6
2019-03-12 22:33:44 +00:00
vichang
d26d5ab46b Merge "Revert "Revert "Delay start of bootanimation until after the Runtime APEX is mounted.""" am: c3ae401a98 am: 54b6b9b678
am: 528328cc40

Change-Id: I32a07660cfb35c1130eaec7eccc3935d3a1016b6
2019-02-25 10:14:33 -08:00
vichang
a6bb8916b0 Revert "Revert "Delay start of bootanimation until after the Runtime APEX is mounted.""
This reverts commit 706bf3f628.

Reason for revert: b/124939955. bootanimation depends on libandroidicu in the Runtime APEX.
Bug: 124939955
Change-Id: I2b5a9d74a5f0ae11978ff4b0850dd7e4becb9b88
2019-02-21 14:51:23 +00:00
Huihong Luo
50a2f36f73 Preload zip before waiting for surface flinger
This saves about 200 msec by preloading media zip file before waiting
for surface flinger becomes ready.

Android Auto results:
BootAnimation: BootAnimationPreloadTiming start time: 8261ms
BootAnimation: BootAnimationPreloadStopTiming start time: 8508ms

Bug: 62056504

Test: adb logcat -s BootAnimation
Change-Id: Iaedf774983a66c2838452c45a04b3a1f4c728f17
2019-02-14 13:37:34 -08:00
Jiyong Park
53a5cf55bd Merge changes from topic "cut_dependency" am: 661bb0414e am: 3e40cac16a
am: af3cdce928

Change-Id: Ie86a2c08f5d60be09170076fd82149acb01d23bf
2019-02-12 20:46:35 -08:00
Jiyong Park
706bf3f628 Revert "Delay start of bootanimation until after the Runtime APEX is mounted."
This reverts commit d848183572.

Reason: the static deps to libnativeloader and libnativebridge no longer
exist

Bug: 123403798
Test: Device boots to the UI
Test: bootanimation is shown from the very beginning

Change-Id: I1a3f214b1d9a19520998c7d1f2d288465a831892
2019-02-12 19:35:45 +09:00
Dominik Laskowski
3316a0a08e Generalize physical display management
This CL enables the framework to manage an arbitrary number of physical
displays. It also surfaces physical display IDs, which are stable across
reboots and encode (model, port) information that will be propagated
further up in a follow-up CL.

Bug: 116025192
Test: Boot with more than two displays
Test: Hotplug works with any number of displays
Test: Verify stable display IDs with "dumpsys display"
Change-Id: Idb2eaff66b2e0873be6ad27d337ff18b730d1331
2019-02-04 10:06:15 -08:00
Nicolas Geoffray
5a516da019 Merge "Delay start of bootanimation until after the Runtime APEX is mounted." am: 20f1e0ca1d am: 73c257556a
am: 8162d9827f

Change-Id: Idd9b09ea7d500b2eb5af6104b44dd7bc7fd1c5c0
2019-01-22 01:25:17 -08:00
Martin Stjernholm
d848183572 Delay start of bootanimation until after the Runtime APEX is mounted.
It depends on libdexfile_external and libnative{bridge,helper,loader} which
are provided by the Runtime APEX.

Test: flash & boot
Test: atest CtsJdwpTestCases
Bug: 113373927
Change-Id: Id9a78f9adb4c928ab4c91fda0ee3ea4b13eed592
2019-01-21 10:55:30 +00:00
Chih-hung Hsieh
419a2638a2 Merge "Fix/suppress bootanimation google-explicit-constructor warnings" am: 50ee220126 am: b737b4fdb3
am: 05ae400a06

Change-Id: I2380f3e0467e1b9c4a8c36f31a2c4c8f45e893b0
2019-01-02 12:14:41 -08:00
Chih-Hung Hsieh
a08d2c2ee7 Fix/suppress bootanimation google-explicit-constructor warnings
* Add explicit to conversion constructors/operators

Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: Ia6ada49250973d507ae8b10d8f0d7c2d47ee805c
2019-01-02 02:43:37 +00:00
Xin Li
15b123ef45 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd
2018-12-11 14:13:44 -08:00
Dan Willemsen
c15cf1d02e Convert bootanimation to Android.bp
See build/soong/README.md for more information.

Test: cd frameworks/base/cmds/bootanimation; mma
Change-Id: I7e023ffc42f61ce9a215a958fbbd158a6a8352d7
Merged-In: I7e023ffc42f61ce9a215a958fbbd158a6a8352d7
(cherry picked from commit efc3e37c9b)
2018-11-19 23:45:08 -08:00
Dan Willemsen
efc3e37c9b Convert bootanimation to Android.bp
See build/soong/README.md for more information.

Test: cd frameworks/base/cmds/bootanimation; mma
Change-Id: I7e023ffc42f61ce9a215a958fbbd158a6a8352d7
2018-11-19 23:39:47 -08:00
Wei Wang
159a410d7b BootAnimation: Use system log
To match the rest of booting log in system_server,
e.g. SystemServerTiming and SystemUIBootTiming.

Test: build
Bug: 118241273
Change-Id: Idf6aca0c503b85c645a7c3d5f430c321a8d83cca
2018-10-23 23:15:58 -07:00
Jorim Jaggi
acfabaa32b Merge "BootAnimation: Fix boot animation with hidden cutout" into pi-dev am: e387ce18d8
am: 2c68abc9fc

Change-Id: I1a0db9f30f7270d49136fa3984dc8d9633ead690
2018-08-22 16:38:27 -07:00
Adrian Roos
9ee5dff83c BootAnimation: Fix boot animation with hidden cutout
We do this by storing the masking inset in a persistent property.
The boot animation then animates itself to where it would be if that
masking inset were applied, then changes the viewport.

For this to work, we also need to make sure the DisplayManagerService
has the right overlay right at the start.

Bug: 112876936
Test: Hide cutout, then reboot. Verify boot animation is smooth.
Change-Id: I3e988b2340b2e0d2be3939bdc6878704c234ccc8
2018-08-22 21:37:39 +01:00
Damien Bargiacchi
1a8a213b77 Fix use-after-free: release the animation after we're done with it
Bug: 64504131
Change-Id: Ibddbc37d96957eeec63035d7f045a8982fb04254
2018-07-24 15:20:26 -07:00
Mickey Keeley
81121bd0ac BootParameters: Use proto for disk io.
Use proto for disk usage.

Bug: 79932027
Test: Ran through the following scenarios-
- RebootActivity parses previous boot parameters; sets next as expected.
- Push old parameters to device and ensured bootanimations reads it and
saves new format (serialized proto) that can be read in userspace
(RebootActivity).
- Unit tests pass.

Change-Id: I98aefb7a832c985d5061ee80ab85a4523f067641
2018-06-20 10:37:54 -07:00
Ed Coyne
33f4b7d63b Refactor audio code out of bootanimation_main.
So it can be shared with the iot/ variant I refactored it into the
audioplay.h file. This keeps all of the audio code local, we could hide
the functions and only expose the callback but that would make testing
harder.

Test: Ran a bootanimation.zip with audio.wav on Marlin, works as expected.
Bug: 67051984
Change-Id: Ie31dc5f2cfaad5bb23134ef81be712afa6b3cd6f
2018-05-31 11:50:47 -07:00
Mickey Keeley
47d2c027db BootParameters: Support silent boot.
* If it's a silent boot, call boot_action_silent_boot from lib.
* Otherwise, boot normally (e.g. with callbacks).

Bug: 78525346
Test: Master (sdk_google_iot_x86) builds and validated on oc-mr1-iot-dev,
* With no boot parameters, the boot is not silent,
* With normal parameters, the boot is not silent.
* With silent parameters, the boot is silent.
* With test bootactions lib, verify lib is loaded and non-silent boot
follows expected sequence and a silent boot calls
boot_action_silent_boot.

In all cases above, sample parameters are preserved.

Change-Id: I74bc9b5262fc4a181339da50726b415c3e4d3398
2018-05-18 12:37:50 -07:00
Mickey Keeley
1ffcc5eed1 BootParameters: Support new API.
Support new parameters based on new API.

Bug: 78525209
Test: Builds and unit tests pass on oc-mr1-iot-dev. Able to push json
to 'next_boot.json' and verify it is moved to 'last_boot.json.' Builds
on master with target sdk_google_iot_x86.

Change-Id: I01d34b7695176e80468b5ddc7ccff50168093017
2018-05-07 09:47:47 -07:00
Mickey Keeley
dfaa9c5e5c BootParameters: Use new JSON reader
* Update JSON blob that BootParameters reads from.
* Change JSON reader to allow custom keys.

Bug: 78524407
Test: Builds. Unit tests pass. End to end flow with RebootActivity
passes values as expected.

Change-Id: I2966f560de4aaf045125946c7fbe1becd47354be
2018-05-02 14:56:52 -07:00
Mickey Keeley
953f1093cd Add BootParameters tests.
Bug: 78577334
Test: Builds on master (aosp_x86-userdebug),
unit tests pass on oc-mr1 (on iot target).

Change-Id: I3584a285f1be914cc3e940469d7dea142d4a4231
2018-04-27 10:44:42 -07:00
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
Steven Moreland
df7675f1cb Merge "Don't use cutils/Atomic.h" am: 07735797a2 am: a272d540d8
am: 0f4ca4a5c0

Change-Id: I4b9798b39d890537f888415b5ac283227970e4de
2018-02-28 14:13:52 +00:00
Steven Moreland
fb7952f57e Don't use cutils/Atomic.h
Test: builds
Change-Id: I74485a5cbecb8710714f7bf3e54da61dd787838f
2018-02-23 15:02:42 -08:00
Jaekyun Seok
c521bb33ac Load bootanimation from /product partition
Bug: 72667033
Test: tested loading /product/media/bootanimation.zip after moving it
from from /system/media to /product/media on sailfish

Change-Id: I10612dd77da7c2c67b02b00b7f0eb2b28e49cc98
2018-01-30 12:03:42 +09:00
Damien Bargiacchi
b90bf1e2ac Update documentation for the clock parameters
Change-Id: I1de48f7c8ba0f417ee7bd302bfbaed1d45877739
2018-01-24 19:31:23 -08:00
Jaesung Chung
e175aaa98c Use vector instead of deprecated ScopedVector
ScopedVector has been deprecated so vector should be used.

Bug: 70598154
Test: build
Change-Id: Ifff33bd03ffed3a0fd48bbf086b7fdad0b69b599
2017-12-13 23:22:36 +09:00
Rob Carr
53966760d7 Merge "Use new SurfaceFlinger transaction API." 2017-10-12 22:08:03 +00:00
David Pursell
be09c954cb iot bootaction: provide default lib name
We want to provide a sane default for the bootaction library name so
that the developer isn't required to mess with read-only properties to
get this working.

Also small cleanup to remove duplicate and unused libs from Android.mk.

Bug: 67644323
Test: builds (master)
Test: properly loads default lib (nyc-iot-dev)
Test: logs and exits when lib doesn't exist (nyc-iot-dev)
Change-Id: I865a45f43b3594c99419e7e27c9798ee944d0db2
2017-10-10 16:51:01 -07:00
Robert Carr
e13b58e15b Use new SurfaceFlinger transaction API.
For now we reimplement global transactions in the Java side
JNI layer.

Bug: 64815723
Bug: 64816140
Bug: 64815766
Test: Existing tests pass. go/wm-smoke
Change-Id: I6c0a7b5e65b1b6cc844ac61f3269629af60a4244
2017-10-09 16:52:48 -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
TreeHugger Robot
9e0b54848d Merge "Delay bootanimation exit until told to shutdown." 2017-09-26 23:47:07 +00:00
Ed Coyne
aa599b90f7 Delay bootanimation exit until told to shutdown.
We delay shutting down the animation if there is a boot action present
until we are told by the system to shutdown.

This addresses an issue we are seeing where we switched to a very short
bootanimation (bootanimation_mini.zip) to save CPU but this kills the
boot action prematurely.

Bug: 37992717
Test: Ran locally against imx7d.
Change-Id: I23556b21128b80d08cc55eaa761439a570b8eebe
2017-09-26 14:28:08 -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
Derek Sollenberger
71b36912e0 Merge "Reduce overhead by combining libskia and libhwui into a single library." 2017-09-25 15:45:34 +00: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
Derek Sollenberger
d938e5a2e2 Reduce overhead by combining libskia and libhwui into a single library.
This is a multiproject change as we need to both the libraries
themselves as well as those that had dependencies on libskia.so

Bug: 31971097
Test: compile only
Change-Id: Ie6ff1f4682d03289205f4d6048cde9f95c61a90f
2017-07-24 09:42:07 -04:00
Kalle Raita
88efa56e1b Fix nobootanimation toggle
The sf.debug.nobootanimation was apparently broken in a recent
refactoring. Flipping the boolean in the utils fixes the issue.

Left some additional logging behind.

Test: marlin-eng boots
Test: my test can prevent the boot animation
Test: shell stop start shows boot animation
Change-Id: I815708a2f16a3a8688cf1a53695e5a8d43194575
2017-07-14 16:18:16 -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
Ed Coyne
2c9e94aa3e Refactor bootanimation into a shared lib.
We would like to reuse the animation parts of it in Android things.
This refactors the audio part into the _main and gets callbacks from
the BootAnimation class at interesting times. This will be the same
approach we take to integrate with it.

BUG: 37992717
Test: Built locally and pushed to a bullhead, works with sound.
Change-Id: I5eaca07c25eeb5edeab07d7ae7a29945e0e2cd37
2017-05-31 10:24:52 -07:00
Keun-young Park
04f7fafdeb Merge "reduce flunctuation in boot animation start / stopping time" into oc-dev am: 06fe82293e
am: dcc539f6ce

Change-Id: I634fb90882b73e7a0bfaebd34f619f0476af16ca
2017-05-24 17:50:15 +00:00