Previously, this was resulting in the output color roughtly as
output_n = color_n * mask_n^2 * (mask_0 + mask_1 + mask_2 + mask_3)
where n is a color channel between 0 and 3.
This caused extra aliasing around edges, since the alpha fades too
quickly along an edge.
Bug: 239632466
Bug: 258246539
Test: verify pixel values for boot animation match mask on watch + phone
Test: modify uFade value, verify pixel colors match
Change-Id: I86742a181576e684aa698a190a8766f4223de799
Sync with changes made in SurfaceFlinger and SurfaceComposerClient.
Use the system property, persist.boot.animation.displays, to determine
the displays to show the boot animation. If the system property is not
present, the first display from the display list is used.
Bug: 241285477
Test: manual, run bootanim command to verify
Change-Id: If29ecb12a68fc075daef2b8f674995d0f11cbc09
During OTA, sysprops aren't available as early in the boot process.
This causes the boot animation to not have dynamic colors.
This CL tries to load the colors more frequently, at every part loop.
Before we'd only try on the first frame of each animation part.
Test: adb shell bootanimation
Fixes: 229029861
Change-Id: I1bbebf93b4fbc31d945c4181472576cf29f13bc7
The resolution may be changed while the boot animation is playing.
mInitWidth and mInitHeight store the original resolution, and then the
animation coordinate and size are recalculated according to the ratio
(mWidth/mInitWidth and mHeight/mInitHeight).
Bug: 228605923
Test: change resolution and then reboot to check the animation
Change-Id: Id09490ecf7fc4b3e1a6baf073c134f357e9b327f
(cherry picked from commit 764ea04421)
Merged-In: Id09490ecf7fc4b3e1a6baf073c134f357e9b327f
The resolution may be changed while the boot animation is playing.
mInitWidth and mInitHeight store the original resolution, and then the
animation coordinate and size are recalculated according to the ratio
(mWidth/mInitWidth and mHeight/mInitHeight).
Bug: 228605923
Test: change resolution and then reboot to check the animation
Change-Id: Id09490ecf7fc4b3e1a6baf073c134f357e9b327f
Since support for Full Disk Encryption was removed in favor of
File Based Encryption, "CryptKeeper mode" no longer exists and the
"vold.decrypt" system property is never set. Therefore, remove the
unused code that supported showing special boot animations in this mode.
Bug: 208476087
Change-Id: I3fa2549338e1889dd9e9b381c60c264b95181b35
During OTA, sysprops aren't load as fast as during regular boot.
This causes the animation to not be able to pick up the dynamic colors.
We can mitigate this issue by trying to reload the sysprops at the
beginning of each animation part.
Test: manual
Bug: 227381265
Change-Id: I4397079aacc52acb5cda54a925f70e4f5c745b3f
The information will be printed
- Message if no animation file
- File name when it's loaded
- Image name and path, loop information when playing
- Play time at the end
Bug: 220161782
Test: Manual, check logcat with and without bootanimation.zip
Change-Id: I0e16bdeb4456a423649a27f7ae88f256e3fa3d19
This change moves the bootanim time file location from /data/system/time
to /data/bootanim/time. This change helps us remove the access to
system_data_file from bootanim.
Bug: 210757252
Test: Boot animation can show time. No SELinux violations.
Change-Id: Ie61155f8976f3b8c6ad5ceac1826140c1455ad54
In 9748086, a detection for clock drifting was implemented. It relies on
2 files that must be provided by the product
(/data/system/time/last_time_change and
/data/system/time/time_is_accurate). Generally, these files are not
available which triggers an SELinux denial error message.
Introduce a new property ("persist.sys.bootanim.clock.enabled") which
can be set by a product to enable this feature (default is false). For
future reference, it is not sufficient to only enable this property, the
product must also provide the files described above (see
BootAnimation::updateIsTimeAccurate).
Bug: 62954877
Test: lunch r11-userdebug && m
Change-Id: Ia27e69547e3d898925029dc0c2be4ad717891c57
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
Test: Flash the updated animation to device. Reboot and check if the
animation shows up.
Bug:199179989
Fixes:199179989
Change-Id: Ic2a2496efcaca4b6ae90c167498b8cd794b46bea
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
The null check added in I603da080b1732a436a10dbaca6f2be9f158124dc makes
our static analyzer suspect that the call to
`playAnimation(*mAnimation)` dereferences null. The beginning of this
function establishes a non-null value for `mAnimation`, which is used
unconditionally throughout the function. Hence, this condition seems
unnecessary.
Bug: None
Test: TreeHugger
Change-Id: I0575df17df7f7e3018d99cafd9dcfcd3c10e5fbc
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
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
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
This reverts commit ad9cf52df9.
Reason for revert: Fixing broken atv test
Test: atv atp test tv/platform/simple_boot_test
Change-Id: I9d6ecb6024ce49eef8007458b0d9bf0ff24906c7
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)
This reverts commit 92aa9daa10.
Reason for revert: Working on fixing the null pointer dereference that caused the build breakage.
Test: Manual
Bug: 190093578
Change-Id: I30e525bcc9f70f9bcba616aa9b7ad39c5d38b46d
This reverts commit 79d079ea49.
Reason for revert: DroidMonitor: Potential culprit for Bug b/196456395 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: I6130e75ae174f68ddfaa6e1010d7979538311020
This CL won't cause any visual change to the boot animation yet
because the asset zips are yet to be udated.
Next steps:
- Update format.md to include documentation for dynamic coloring.
- Update asset zip files.
Test: Manual
Bug: 190093578
Change-Id: I63fdb1983896f321288d595d06f46bcde7da1aab
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
This reverts commit d711ac4858.
Reason for revert: Breaks boot animation on wembley device
Bug: 194074093
Change-Id: Id6143bfd1e35089a7df88470978cd064de2d839c
Test: wembley has boot animation again with this reverted
Main changes in how rendering is done:
- Texts and images are drawing using a textured quad instead of glDrawTexiOES.
- Shaders are introduced to draw with textures.
- Frame fading is also done with shaders now, instead of drawing background
colored transparent rectangles.
Test: Verified the main animation, clock text, progress text and stock
android animation all render correctly.
Bug: 190093578
Change-Id: Ie3f336d22bcc9e24f06a2bd62683d7a8c87a85f6
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