161 Commits

Author SHA1 Message Date
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 efc3e37c9b2dc1599cf75b49514665049951d7de)
2018-11-19 23:45:08 -08: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
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
Keun-young Park
721c9dc125 reduce flunctuation in boot animation start / stopping time
- Add separate 100ms interval polling for SurfaceFlinger. Otherwise,
  it can be blocked with 1 sec polling and cause 1 sec of additional
  delay frequently.

bug: 38450031
bug: 35253872
Test: many reboots and check time to finish boot animation, python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 100 -f -e 15 -w 30 -v

Change-Id: I353ca04183cbe59b82da99dc3fecfce63314cd2f
2017-05-23 09:34:24 -07:00
Mike Reed
7c0ae0f58b bitmaps and pixelrefs no longer need lock/unlock
Test: covered by CtsGraphicsTestCases and hwui_unit_tests

Change-Id: I42a25961a2eb3755d2fd22a617aa21a24ec0994f
2017-04-18 10:22:42 -04:00
Keun-young Park
d1794cdbb4 show different timing log for shutdown animation
bug: 36873098
Test: reboot and check log
Change-Id: Ic3adaba383cc29dba039a7fb5adcb01d4c0c963b
2017-04-04 22:21:32 +00:00
Keun-young Park
b593842063 support shutdown animation from bootanim
- init will set sys.powerctl property and run bootanim.
- Use /oem/media/shutdownanimation.zip or
  /system/media/shutdownanimation.zip for animation file.
  If none of them exist, android animation will be used.
- Disable audio playing for shutdown animation.
- Disable TimeCheckThread for shutdown animation. It
  accesses /data partition and can block umount.

bug: 36526187
Test: many reboots

Change-Id: If02c73cda2015317d88d056cd45201208da49946
2017-04-03 14:43:14 -07:00
Wei Wang
dbdda2b60e BootAnimation: change log format when animation starts
Bug: 34499826
Test: on marlin
Change-Id: I719485d399406abc08360620c09d90f4b87934a6
2017-02-07 18:59:58 -08:00
Wei Wang
a90c54c90e BootAnimation: Add log when animation starts
Bug: 34499826
Test: on marlin
Change-Id: I04e4663daf4b30e2ab3c1ddda215127cf7faef9f
2017-02-02 20:17:54 -08:00
Geoffrey Pitsch
a917353da0 Initialize bootanimation sound on separate thread
Blocks when it's time to play the first sound.
Bug: 30189706
Test: on marlin
Change-Id: Ib3666fbfb5f109c633ed59edad4a283b8ada8ae2
2017-01-31 15:49:06 -08:00
Dmitri Plotnikov
190495a690 Merge "Adding "quiescent" reboot mechanism to support STB operators" 2016-12-12 21:37:33 +00:00
Dmitri Plotnikov
a8d2c6457f Adding "quiescent" reboot mechanism to support STB operators
Bug: 31681185
Change-Id: Iada4dd4624f0221e5b59440da2718da980742720
Test: with SampleLeanbackDeviceAdmin.  CTS test forthcoming
2016-12-08 10:49:24 -08:00
Damien Bargiacchi
53dd8b80a5 Centre clock text on visible characters instead of : character am: 45a7644004 am: 04f17be3e6
am: e2ca6b465e

Change-Id: If3edabead7835e9949f1d1601cbe7cb59c0bbc4c
2016-12-06 18:47:46 +00:00
Damien Bargiacchi
04f17be3e6 Centre clock text on visible characters instead of : character
am: 45a7644004

Change-Id: Ibb152f2217297ab0b0aa1ec622e59ae8ae815d59
2016-12-06 18:32:48 +00:00
Damien Bargiacchi
45a7644004 Centre clock text on visible characters instead of : character
Bug: 33340845
Change-Id: I235ad7c6aafc62daa55242f81df2d076f27c56df
2016-12-05 18:02:18 -08:00
Baligh Uddin
b1df48d326 Merge remote-tracking branch 'goog/cw-f-dev' into fix_merger
Bug: 32849428

* goog/cw-f-dev: (98 commits)
  Revert "Catch KeyStoreException for setting profile lock"
  Fix createConfirmDeviceCredentialIntent for wear for CTS.
  Fix default dialog background colour for watch devices.
  Catch KeyStoreException for setting profile lock
  Add cross-links between FINE and COARSE location permissions. bug: 25371600
  Fixed a bug with the emergency affordance in multi user
  Zygote: Additional whitelists for runtime overlay / other static resources.
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Zygote : Block SIGCHLD during fork.
  colors: add missing accent_material_{700,50} resources.
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Zygote : Block SIGCHLD during fork.
  DO NOT MERGE ANYWHERE Revert "DO NOT MERGE ANYWHERE libhwui: make setSurface asynchronous"
  ...

Change-Id: I63468da5bfa21ed9ac5985bbdbf3a61d4c389aa0
2016-11-22 17:19:45 -08:00
Damien Bargiacchi
f5970785ad Allow boot clock to be toggled between 12 and 24 hour format am: 9071db1d37 am: 3400dffcad
am: bb2e8993f0

Change-Id: I8f4ccc9e82e5539c615a8388a002d5ab196f77f9
2016-11-01 01:56:55 +00:00
Damien Bargiacchi
bb2e8993f0 Allow boot clock to be toggled between 12 and 24 hour format am: 9071db1d37
am: 3400dffcad

Change-Id: Ic4df64d163845547416ef1280ae2ba2f1b41efda
2016-11-01 01:52:09 +00:00
Damien Bargiacchi
9071db1d37 Allow boot clock to be toggled between 12 and 24 hour format
Bug: 32461548
Change-Id: I414192e6d9f3ae44267f4a360e35647f18c420b4
2016-10-28 18:04:48 -07:00
Geoffrey Pitsch
264599f10d Support multichannel sounds in bootanim am: db90897b5f am: 023a9185a4
am: 57374aa735

Change-Id: If5af3c4c2e2746637399edfa4739efd19499fc42
2016-09-14 19:23:05 +00:00
Geoffrey Pitsch
57374aa735 Support multichannel sounds in bootanim am: db90897b5f
am: 023a9185a4

Change-Id: I5543cefe87ec93f6c319337e0a2c692d28ec893a
2016-09-13 16:35:26 +00:00
Geoffrey Pitsch
023a9185a4 Support multichannel sounds in bootanim
am: db90897b5f

Change-Id: Ied6b429e05d5d77c76e9bbf34a7f13104be8bb8e
2016-09-13 16:27:14 +00:00
Damien Bargiacchi
f67b317c10 resolve merge conflicts of 6574d9c to master
Change-Id: I9b97396a03f80507d71a52d281f88f686712b129
2016-09-07 20:17:14 -07:00
Damien Bargiacchi
6574d9ca46 Allow custom fonts in the boot animaiton zip file
am: 0e3d2ab6d2

Change-Id: I13d1e6a707ad941a267b89483e6dc029398a2d82
2016-09-08 02:19:57 +00:00
Damien Bargiacchi
0e3d2ab6d2 Allow custom fonts in the boot animaiton zip file
Change the font format to be a 16x6 grid of characters

Bug: 29580875
Change-Id: Ia468307cb9770436e8ae865c91acda23a71bde05
2016-09-05 04:51:45 -07:00
Geoffrey Pitsch
db90897b5f Support multichannel sounds in bootanim
Manually handle the 1-2 channel cases to avoid the warning
log when 0 is passed as the channelMask.

Bug: 30820152
Change-Id: I4d2c8736ff442fae9a4c5eb16061646fb53151b6
2016-08-24 16:59:16 -04:00
Geoffrey Pitsch
fa88d56464 Suppress Boot sound for non-standard scenarios. am: 290c4350ed am: 854f8cecf7
am: 9e7b3f657f

Change-Id: Id7d1cb29fa1e1a416d56b4b16a73576a458216c4
2016-08-11 13:22:28 +00:00
Geoffrey Pitsch
9e7b3f657f Suppress Boot sound for non-standard scenarios. am: 290c4350ed
am: 854f8cecf7

Change-Id: I182a77ce9fec2ae3f900a544ac4af8064240a06b
2016-08-11 13:13:04 +00:00
Geoffrey Pitsch
290c4350ed Suppress Boot sound for non-standard scenarios.
Blacklisted bootreasons will not play a sound (e.g. "kernel_panic")
If boot has already completed, assume this is a runtime restart and
skip the sound.

Bug: 30654343
Change-Id: I41b1829a93c0d9a63c69aea2d1614eaa18b72230
2016-08-10 10:52:48 -04:00