Commit Graph

157 Commits

Author SHA1 Message Date
TreeHugger Robot
6d673f1f9a Merge "Fix AOSP boot animation black screen issue." into sc-qpr1-dev 2021-09-10 19:28:29 +00:00
Shan Huang
bfd2d3ce72 Fix AOSP boot animation black screen issue.
Bug: 197740038
Test: Force stock android animation on a pixel phone in
BootAnimation.cpp. (Remember to disable dynamic coloring.) Check stock android animation.

Change-Id: I3c3979c344a351ec261bb12127cff971d6050367
2021-09-09 23:19:04 +00:00
Shan Huang
81846bad1a Fixes boot animation not appearing issue on Oriole.
Test: Flash the updated animation to device. Reboot and check if the
animation shows up.
Bug:199179989
Fixes:199179989

Change-Id: Ic2a2496efcaca4b6ae90c167498b8cd794b46bea
2021-09-07 19:27:41 +00:00
Shan Huang
488ff7459c Support rendering white pixels.
This CL allows dynamic color boot animations to render graphics in shades of white.

Bug: 190093578
Test: adb shell stop; adb shell start. Complete reboot to see the full
sequence (including the loader part)

Change-Id: I672a49aff90fa04daa4bdd6fd3c0b5497cc1a115
2021-08-26 20:28:08 +00:00
Shan Huang
a1f7a71c2d Move boot color sysprop parsing to after loading zips.
Otherwise the sysprops would not be loaded yet and accessing them would
return empty strings.

Though unlikely, this is not 100% safe because boot color sysprops
are not guaranteed to be loaded by the time zips are loaded. A TODO
here is to understand boot steps and their timing implications so
that we can fully avoid the race condition.

Bug: 190093578
Test: adb shell setprop persist.bootanim.color(1-4), then reboot phone.
Change-Id: I603da080b1732a436a10dbaca6f2be9f158124dc
2021-08-19 18:50:25 +00:00
Shan Huang
89965006af Revert "Revert "Revert "Revert "Implement dynamic colors for boot animation.""""
This reverts commit ad9cf52df9.

Reason for revert: Fixing broken atv test
Test: atv atp test tv/platform/simple_boot_test
Bug: 190093578

Change-Id: I9d6ecb6024ce49eef8007458b0d9bf0ff24906c7
2021-08-18 17:20:45 +00:00
Lucas Dupin
dd7ed60de0 Revert "Revert "Migrate boot animation from GLES 1.0 to GLES2.0.""
This reverts commit 2ded80094e.

Reason for revert: Working on fixing the regression that happened on Wembly, so we can resume feature work.

Change-Id: I9a624beffdaf97f131046fd4441a251ed3a448ad
Test: adb shell /system/bin/bootanimation
Bug: 190093578
(cherry picked from commit 8eedc0293d)
2021-08-16 20:17:48 +00:00
Nicolas Geoffray
db45defb94 Merge "bootanimation: ensure that if a percent is shown, we'll get to 100." am: 87c254de0e am: 10e844df41 am: 55b2ba298c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1681127

Change-Id: I1ee402945af4207affb77d61eb76a21c175ac1fc
2021-04-21 09:54:52 +00:00
Nicolas Geoffray
a12987512c bootanimation: ensure that if a percent is shown, we'll get to 100.
Seeing 100 while booting is not finished, or seeing eg 90 while booting
is not finished isn't user-friendly.

Test: update ART module, see percent progress
Change-Id: I5509c83f661f937f00a7d28c789df509e3528a37
2021-04-20 15:15:06 +01:00
Marin Shalamanov
cb783ca6d9 Tracking changes to renaming DisplayConfig to DisplayMode
Bug: 159590486
Test: presubmit
Change-Id: I64e57fe4d73c22bbbe0a1767cadf8648259e9beb
2021-02-04 19:37:51 +01:00
Nicolas Geoffray
bbb00e78ef Support for showing percent progress in boot animation.
Bug: 175686819
Test: boot with manual changes updating the progress

Change-Id: I2d936e3391f56796308c90deb39ecacc58797721
Merged-In: I2d936e3391f56796308c90deb39ecacc58797721
2021-01-11 13:56:21 +00:00
Nicolas Geoffray
41fffb49d5 Support for showing percent progress in boot animation.
Bug: 175686819
Test: boot with manual changes updating the progress

Change-Id: I2d936e3391f56796308c90deb39ecacc58797721
2021-01-08 10:52:33 +00:00
Philip Junker
f1291ba703 Send shutdown callback only during animation destruction
The shutdown callback is currently used only by audioplay.cpp to destroy the audio player.
Sending shutdown when the animation is destructed makes sure the audio
player is not being destroyed before its boot animation part is being displayed.

Test: Modified bootanimation, sound in second last part of bootanimation
plays
Bug: 157407957
Bug: 127254055
Merged-In: I47f57643791e73e4a4fa1597309dccb1f52f2316

Change-Id: I47f57643791e73e4a4fa1597309dccb1f52f2316
2020-12-01 16:45:52 +01:00
Philip Junker
60600569a0 Send shutdown callback only during animation destruction
The shutdown callback is currently used only by audioplay.cpp to destroy the audio player.
Sending shutdown when the animation is destructed makes sure the audio
player is not being destroyed before its boot animation part is being displayed.

Test: Modified bootanimation, sound in second last part of bootanimation
plays
Bug: 157407957

Change-Id: I47f57643791e73e4a4fa1597309dccb1f52f2316
2020-11-26 15:00:23 +01:00
Yegor Malyshev
eafcb99786 Support animation parts fading out
This support helps with several things:
- simpler animation structure (size, number of items)
- more room for designers avoiding thinking about exit part
- time saving as complete parts now can be safely used as fading parts

Bug: 167352662
Test: Manual testing of major/edge cases
  - backward compatibility => "f 0" is mapped to "p", "p" still works
  - only trimmed areas are faded out
  - clock is not faded out (wear case)
  - adb shell su root bootanimation
  - [c, (exit) f 120, c] => "f 120" fades out and "c" completes
  - [c, (exit) f 120, f 320] => "f 120" fades out and "f 320" skipped
  - [c, f 16, (exit) f 120] => "f 16" played, "f 120" fades out
  - [c, (exit) f 0, f 120] => "f 0" skipped, "f 120" fades out

Change-Id: I9b200ee7107ef9b3dc8d711658ed1042b83739c2
Merged-In: I9b200ee7107ef9b3dc8d711658ed1042b83739c2
2020-10-19 14:33:17 +02:00
Yegor Malyshev
6925e1bde0 Support animation parts fading out
This support helps with several things:
- simpler animation structure (size, number of items)
- more room for designers avoiding thinking about exit part
- time saving as complete parts now can be safely used as fading parts

Bug: 167352662
Test: Manual testing of major/edge cases
  - backward compatibility => "f 0" is mapped to "p", "p" still works
  - only trimmed areas are faded out
  - clock is not faded out (wear case)
  - adb shell su root bootanimation
  - [c, (exit) f 120, c] => "f 120" fades out and "c" completes
  - [c, (exit) f 120, f 320] => "f 120" fades out and "f 320" skipped
  - [c, f 16, (exit) f 120] => "f 16" played, "f 120" fades out
  - [c, (exit) f 0, f 120] => "f 0" skipped, "f 120" fades out

Change-Id: I9b200ee7107ef9b3dc8d711658ed1042b83739c2
2020-09-21 20:55:21 +02:00
Marin Shalamanov
11599eeaee Use type safe display IDs.
Bug: 160679868
Test: m && flash device
Test: take screnshot on device
Change-Id: Id0cd5859b76fc29911d07119d54f329805425b7e
2020-08-04 11:38:05 +02:00
TreeHugger Robot
e350724e34 Merge "Render boot animation with same size as framebuffer" into rvc-dev am: cbea0ab58f am: 937a25de15 am: 35ae2778c3 am: 3c1b9ad9af
Original change: undetermined

Change-Id: I1ae7b19afe2e88fc1a7fd32c41fb870e80685ff8
2020-06-02 11:39:57 +00:00
Marin Shalamanov
047802d416 Render boot animation with same size as framebuffer
When ro.surface_flinger.max_graphics_{width|height} is
set the framebuffer size is limited by this property.
However the boot animation size matches the display active
mode size which can cause it to be off-center or partially
visible.

This change limits the boot animation surface size with
accordance with ro.surface_flinger.max_graphics_width.

Bug: 153991408
Test: manual
Change-Id: Idfd1c9adc1f6b10f44bc04ec2078dbc823f28ed6
2020-05-29 18:15:52 +02:00
TreeHugger Robot
569b3fbfa7 Merge "Resize boot animation on display changes" into rvc-dev 2020-05-27 12:17:08 +00:00
Marin Shalamanov
1a6e368920 Resize boot animation on display changes
Use DisplayEventReceiver to listen for display hotplug
events and resize the boot animation is display size
changes.

Bug: 156448328
Test: manually make sure the boot animation has correct
dimensions in the following cases
     I. With boot animation file
        1. scrcpy
        2. start boot animation with
              adb shell /system/bin/bootanimation
	   when no physical display is connected (= 480p
           fake HWC display). Use the virtual display from
           scrcpy to check the boot animation size.
        3. connect a 1080p display
           (HWC sends hotplug connect to change the display)
        4. disconnect the real display
     II. Same steps without boot animation file
         (android logo should be displayed)

Merged-In: Ib3f0383686399669e8de10456092baaec607fa01
Change-Id: Ib3f0383686399669e8de10456092baaec607fa01
2020-05-27 11:50:23 +02:00
TreeHugger Robot
8f631886c5 Merge "Resize boot animation on display changes" 2020-05-26 19:21:50 +00:00
Marin Shalamanov
9070c055b6 Resize boot animation on display changes
Use DisplayEventReceiver to listen for display hotplug
events and resize the boot animation is display size
changes.

Bug: 156448328
Test: manually make sure the boot animation has correct
dimensions in the following cases
     I. With boot animation file
        1. scrcpy
        2. start boot animation with
              adb shell /system/bin/bootanimation
	   when no physical display is connected (= 480p
           fake HWC display). Use the virtual display from
           scrcpy to check the boot animation size.
        3. connect a 1080p display
           (HWC sends hotplug connect to change the display)
        4. disconnect the real display
     II. Same steps without boot animation file
         (android logo should be displayed)

Change-Id: Ib3f0383686399669e8de10456092baaec607fa01
2020-05-26 16:55:06 +02:00
TreeHugger Robot
5c109facf4 Merge "Log inotify errors." into rvc-dev am: 8683e2eeba am: 9fb2af9114 am: 2e990f7233 am: adf42b8708
Change-Id: Iaaccede61f42c34220b0fb9575af4c6839dbd819
2020-05-12 05:33:16 +00:00
Dan Sandler
562d46d592 Log inotify errors.
Bug: 155954661
Test: boot
Change-Id: Ic054ecf6acebba12485926b66d4fb96fa7712547
2020-05-11 17:09:22 -04:00
Derek Sollenberger
22d0d4c7f1 Use public APIs for decoding images for the boot animation
HWUI is restricting access to only a set of stable C APIs. Callers like
boot animation are being converted to either the stable C or NDK APIs.

Test: build and verify animation on reboot
Bug: 150782769
Change-Id: I1fb7c9e0ed2f7bcecec109ddc32b1c5a473f7f3a
2020-04-08 10:53:46 -04:00
Dominik Laskowski
69b281d5f3 Adapt SurfaceControl to libgui API for display info
Bug: 144601064
Test: dumpsys display
Change-Id: I477e0e3126cc15eb5f120610b4e6b6b1568df389
2020-01-29 14:32:45 -08:00
Automerger Merge Worker
789ce028b5 Merge "Add a way to customize boot animation during userspace reboot" am: 3d0bb1d650 am: ab74c5633a am: d7c39e5ca9
Change-Id: I7aa06e75dfe7fd8b7bb29830ea46ebcbe96b536a
2020-01-29 11:54:51 +00:00
Nikita Ioffe
06c986e7c9 Add a way to customize boot animation during userspace reboot
In case userspace reboot boot animation can't be found, a default
Android logo is going to be shown.

Test: adb reboot userspace
Bug: 148172262
Change-Id: Ida12ffcfe73b335b63178f3e3f2b0c4063dae2c2
2020-01-28 15:41:42 +00:00
Huihong Luo
4e999d5dac Merge "Rename system property" 2020-01-17 23:14:55 +00:00
Huihong Luo
d4a217e00e Rename system property
to be persist.service.bootanim.displays to control which displays can show
bootanimations. This way a user can change the proeprty to be persistent
across reboot.

Bug: 132892728
Test: manual
Change-Id: I2b98a689aafcb2f2c32f0a675624feb72ca18470
2020-01-17 19:38:25 +00:00
Dominik Laskowski
2a3d9aaebb Use ui::Rotation in libgui calls
Bug: 144601064
Test: Build
Change-Id: I46d6974e67dcae2d42766f08c899c56dddd795e9
2020-01-07 12:28:16 -08:00
Greg Kaiser
080f9e6579 BootAnimation: Minor whitespace fix
Test: TreeHugger
Change-Id: Iccedcb9bb5751fc0aecbf460be0062ea86fdaccb
2019-12-03 07:37:59 -08:00
Greg Kaiser
7426ec8e78 BootAnimation: Avoid memory leak in error case
If we fail preloadZip(), we release the animation prior to
returning.

Test: TreeHugger
Change-Id: I632c052ef22b2a7192b516de5726bf4e74544f7a
2019-12-03 07:37:52 -08:00
Huihong Luo
f97c9e241f Add multi-display support for boot animation
This shows boot animations to the primary and other displays, verified
with 3-display setup.

A guest property, boot.animation.displays, controls which additional displays
to show the boot animation, in addition to the primary display. Use comma
as separator to specificy multiple values, for example:
  setprop boot.animation.displays 19260422155234049,19261083906282754

An example CL on how to set this system property: ag/9269083

Bug: 132892728

Test: adb logcat -s BootAnimation
Change-Id: I1ce3ebd57817246a7a0de42af9465e2a3517826b
2019-08-29 16:49:55 -07:00
Kyeongkab.Nam
15e24878d6 Merge "Fix bootanimation stack overflow"
am: 935d8032c8

Change-Id: If5b2538dc6f2f8639166eaf9c27eb152b8c5419a
2019-07-22 19:57:21 -07:00
Kyeongkab.Nam
35a8a11697 Fix bootanimation stack overflow
length of input from scanf is not limited even though MAX char of path
is defined as 256. This could cause stack corruption when length of input
is over MAX.

Test: run bootanimation with desc.txt which has over 256 length of path.

Change-Id: Ic60081ca82067ad671508e766c495546af9233d1
2019-07-18 10:12:10 +09: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
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
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
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
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
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