141 Commits

Author SHA1 Message Date
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
Geoffrey Pitsch
d6536e4d22 BootAnimation system property to play sound. am: 305087991d am: 8e4b8a988f
am: 5e8bb86e8c

Change-Id: Ibcf73b3245b63492c1feaa1494271c181c86c59e
2016-08-09 17:31:06 +00:00
Geoffrey Pitsch
5e8bb86e8c BootAnimation system property to play sound. am: 305087991d
am: 8e4b8a988f

Change-Id: Icd062a5b3eb9da9d9c7bd3c5d7dd4e40f75c3a1e
2016-08-09 17:22:51 +00:00
Geoffrey Pitsch
305087991d BootAnimation system property to play sound.
Optional system property "persist.sys.bootanim.play_sound"
If nonexistent, default behavior plays the sound.

Bug: 30690353
Change-Id: Ie5ed456d891632be5ec8be255ac7c1193753c741
2016-08-08 16:18:21 -04:00
Jesse Hall
b5f8fe1629 Merge \\\\"bootanimation: Call eglReleaseThread in threadLoop\\\\" am: 189bbd9f6d am: 9495872add am: 41ebe86049
am: af2a8a9ca6

Change-Id: Ic03306aadf473d0c5cf6954288c57b759186c807
2016-07-25 04:05:30 +00:00
Sai Kiran Korwar
af2a8a9ca6 Merge \\\"bootanimation: Call eglReleaseThread in threadLoop\\\" am: 189bbd9f6d am: 9495872add
am: 41ebe86049

Change-Id: I7927f23aa76cc17221e557d7f36b95bc23696a1b
2016-07-25 03:57:18 +00:00
Sai Kiran Korwar
9495872add Merge \"bootanimation: Call eglReleaseThread in threadLoop\"
am: 189bbd9f6d

Change-Id: Iaa5b3e60548ee2cce19cb4c31a6274d0ad877189
2016-07-25 03:46:44 +00:00
Eric Laurent
877ed1521f bootanimation: fix glitchy playback am: 197e47979a
am: 88e23db1ee

Change-Id: Id402ff19c495e0813dd32cb4897033760daead0e
2016-07-22 20:42:32 +00:00
Eric Laurent
197e47979a bootanimation: fix glitchy playback
Do not use low latency playback mode to be more
robust against scheduling problems during boot phase.

Also:
- remove unused reverb on output mix
- fix WAV file parser.

Bug: 30277818
Change-Id: I1e15d3003a25c93d4995006885b32a754d17343f
2016-07-22 11:31:25 -07:00
Geoffrey Pitsch
559e3bce85 Merge \\"Play boot sound on the System stream.\\" into nyc-mr1-dev am: 7d2f4cc750
am: bbb9d56a0e

Change-Id: I7286ca72cb20fa4f0339caff22ca50cd7564d43e
2016-07-19 19:17:37 +00:00
Derek Sollenberger
163c97a8ea Merge changes from topic 'skia_merge'
* changes:
  Fix include to match Skia filename change
  Remove references to SkImageDecoder (part 2)
  Update SkiaCanvasProxy with SkSurface API change
  Return DNG mimeType for the case kDNG_SkEncodedFormat
  Remove use of SkFixed. Update code to use SkGlyph.fAdvance[XY] after https://codereview.chromium.org/1737693006.
  skia SkDocument - new MakePDF API, fix leak
2016-07-18 12:07:44 +00:00
Geoffrey Pitsch
5613313533 Play boot sound on the System stream.
Turning down the ring volume will also turn down boot sound.

BUG:30132711
Change-Id: I902e56b20f105c27209dd47f054e98085647ee85
2016-07-15 10:50:04 -04:00
Matt Sarett
8898c16987 Remove references to SkImageDecoder (part 2)
As of this CL, SkImageDecoder is no longer used in Android and
will be deleted by Skia.

(cherry picked from commit 097a6ea4b65046df3e3cbf93d1acfc4e6833e02f)

Change-Id: Ic754ab0dde7ad1b65ccf3b2bc23fcbc5ef44ed08
2016-07-15 08:19:12 -04:00
Geoffrey Pitsch
a91a2d7375 Fixes delay when playing first sound in BootAnimation
audioplay is initialized with an example of the type of clip it
will play.
Also remove asserts and debug compile settings from BootAnimation.

BUG:24800792
Change-Id: Icb78489417aee0549c340c746b25e57ccdb3427e
2016-07-13 15:51:24 -04:00
Damien Bargiacchi
4786f6d958 Merge "Don't show times before 2000-01-01" into nyc-mr1-dev 2016-07-13 00:40:07 +00:00
Damien Bargiacchi
9676281c4f Don't show times before 2000-01-01
BUG=27802041

Change-Id: Iaa826e029c3b887e2bda6d12bc7c372d862ed320
2016-07-12 16:03:37 -07:00
Geoffrey Pitsch
859029ff7b Merge "OpenSL-based audio support for BootAnimation" into nyc-mr1-dev 2016-07-12 17:29:56 +00:00
Tim Murray
b646ec13e1 Merge changes from topic 'stune' into nyc-mr1-dev
* changes:
  Put bootanimation in top-app stune group.
  Sets android.ui to be in the fg stune group.
2016-07-11 20:29:40 +00:00
Geoffrey Pitsch
143d48927e Merge "BootAnimation: Use npot textures" into nyc-mr1-dev 2016-07-11 20:12:40 +00:00
Tim Murray
5c52691a48 Put bootanimation in top-app stune group.
bug 29512132

Change-Id: Id39650177b1f3b1ca24edb72b2809ee4ded396a1
2016-07-11 11:41:52 -07:00
Geoffrey Pitsch
2fb30fb68e Wait until end of BootAnimation to free looping textures
glDeleteTextures causes a noticeable framerate hitch when switching to
the outro.  By the time looping is finished, the system has finished
booting, so freeing the textures immediately is less beneficial.

Bug: 29878551
Bug: 30040263
Change-Id: I5a404a6e18cd2cf64d6c94343f82fa5db8dfbab3
2016-07-11 13:02:41 -04:00