Commit Graph

198 Commits

Author SHA1 Message Date
Andrew Zeng
c995bbbf5f Merge "Fix boot animation alpha multiplication computations" into tm-qpr-dev am: b1b275b032 am: 03a7f370bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20414907

Change-Id: Ib65162c7a87d213f592ffcfb3286e263bf6cce0c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-09 22:34:21 +00:00
Andrew Zeng
03a7f370bc Merge "Fix boot animation alpha multiplication computations" into tm-qpr-dev am: b1b275b032
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20414907

Change-Id: I49511900ae3da6f0fd8f30c34e7d964e71bb9892
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-09 21:45:23 +00:00
Andrew Zeng
f9f5822d8d Fix boot animation alpha multiplication computations
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
2022-11-08 20:00:34 +00:00
Huihong Luo
4430510577 Remove internal display related methods
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
2022-10-03 10:24:52 -07:00
Vishnu Nair
0c2269fa4b SurfaceComposerClient: Remove setSize
This function is a noop with the introduction of BLAST.

Bug: 238781169
Test: presubmit
Change-Id: I84917bed157a93ec9bfd16d168312ce27ff1765e
2022-08-17 15:51:13 +00:00
Lucas Dupin
4e43fa9194 Merge "[Bugfix][BootAnimation] Fix the issue of the transparent background image shows transparent background unexpectedly in BootAnimation on some MTK platforms." am: 6562eb87f3 am: e3f08c403e am: 8ab593e3a8 am: 11aec9327a am: 09a38f4d9f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2092083

Change-Id: I810f5980140cfb02e7c282d179c42c0c44469d7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-14 01:41:01 +00:00
Lucas Dupin
8ab593e3a8 Merge "[Bugfix][BootAnimation] Fix the issue of the transparent background image shows transparent background unexpectedly in BootAnimation on some MTK platforms." am: 6562eb87f3 am: e3f08c403e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2092083

Change-Id: Iae7ebfe443056439545dec77f4f2e6b19afe79bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-14 00:23:15 +00:00
xi yu
c341544c80 [Bugfix][BootAnimation] Fix the issue of the transparent background image shows transparent background unexpectedly in BootAnimation on some MTK platforms.
Test: manual

Change-Id: I2074a48c6d3fc11f393bfa4fbcbcd8d0df5c780f
2022-05-13 09:03:00 +00:00
Lucas Dupin
55e86f55e0 Merge "Try to load colors more frequently" into tm-dev am: af8e6e4eba am: 51de64061b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17944265

Change-Id: I33c9221a8143e363e7a98f822a4c0c954d916ed4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-26 23:25:22 +00:00
Lucas Dupin
bfd1812fcb Try to load colors more frequently
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
2022-04-25 15:57:38 -07:00
joenchen
85b339fb24 bootanimation: correct logo position and size after resolution changed
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
2022-04-20 07:05:15 +00:00
Joen Chen
233c241f21 Merge "bootanimation: correct logo position and size after resolution changed" into tm-d1-dev am: aa991f8f39 am: 05c6a7eac5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17750681

Change-Id: Ia3b58875474fbf419b6d0c5d247c01f068eabdc0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 00:46:59 +00:00
joenchen
764ea04421 bootanimation: correct logo position and size after resolution changed
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
2022-04-19 02:05:33 +00:00
Eric Biggers
c552aca5e2 Remove unused support for "encrypted" boot animations
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
2022-04-12 01:31:51 +00:00
Lucas Dupin
cd25684a0c Reload color sysprops after failing
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
2022-03-29 23:38:50 +00:00
Treehugger Robot
780bfed3f9 Merge "Add additional logs for bootanimation" am: 51a4954076 am: 4aa84137f0 am: a73e533986
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1991970

Change-Id: Ia36255c49f4323125ac37b812b28a87091c8cd79
2022-03-04 03:03:17 +00:00
Yoshiaki Maruoka
9ef19b85cb Add additional logs for bootanimation
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
2022-03-03 07:40:43 +00:00
Josh Yang
f95b2007a3 Change the bootanim time file location.
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
2021-12-23 14:35:34 -08:00
Thiebaud Weksteen
2a32ff7e14 Merge "Enable clock only when supported by product" 2021-12-13 00:56:44 +00:00
Thiébaud Weksteen
08de4439ac Enable clock only when supported by product
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
2021-11-23 10:49:49 +11:00
Keith Mok
6704dc46f0 Merge "Fix nanosleep in BootAnimation" am: 45e281ef2b am: 73357c61d0 am: fd42131e14 am: c42a8a0793
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1891586

Change-Id: Iebc79f0ba23152c05de1f456fec984e225c1ea03
2021-11-19 23:38:37 +00:00
Keith Mok
73357c61d0 Merge "Fix nanosleep in BootAnimation" am: 45e281ef2b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1891586

Change-Id: I19f359a175aa9596f400481029c029c2dd908aa5
2021-11-19 22:54:54 +00:00
Keith Mok
0f2e66866c Fix nanosleep in BootAnimation
clock_nanosleep will return 0 or error no directly.

Bug: 207149564
Test: Build ok
Change-Id: I15866728719d0672a16b4a76a8fd3be4d53d420a
2021-11-19 20:38:22 +00:00
TreeHugger Robot
a254195dc4 Merge "Fix AOSP boot animation black screen issue." into sc-qpr1-dev am: 6d673f1f9a am: e277f0ded5 am: 1b45e9c5fc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15799420

Change-Id: I77b788dea2058df0109ee9e38c924416bf230500
2021-09-10 20:51:57 +00:00
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
TreeHugger Robot
03c3759126 Merge "Fixes boot animation not appearing issue on Oriole." into sc-qpr1-dev am: 3a986bb956 am: 580ae422b6 am: 8dbf247294
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15779528

Change-Id: I4501403e20e0a3b50af1629a3d01b8a20d0cefaa
2021-09-09 21:34:16 +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
05701b8eb5 Merge "Support rendering white pixels." into sc-qpr1-dev am: e2f4ad3e7b am: cfb0fe05a5 am: fbe437bd10
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15676845

Change-Id: I2f98a90333e19cda3b22229a90a8112dc0e999a2
2021-08-27 04:19:08 +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
George Burgess IV
0f8e8110b1 BootAnimation: remove superfluous null check for mAnimation
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
2021-08-23 17:32:23 -07:00
Shan Huang
7bd03e61aa Merge "Move boot color sysprop parsing to after loading zips." into sc-qpr1-dev am: a1c0f6dd41 am: 28c7d63d16 am: a332213f93
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15600978

Change-Id: I5ad79c95f2098d4876f691d74541948468647ed3
2021-08-19 22:04:43 +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
4a14527fb8 Merge "Revert "Revert "Revert "Revert "Implement dynamic colors for boot animation.""""" into sc-qpr1-dev am: 813c29b9a5 am: 9d7c1b7163 am: ba48d5a0f9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15600806

Change-Id: I8478388303170a00c288e37274e9560c817d52f6
2021-08-19 01:24:43 +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
Shan Huang
7fee352207 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-18 01:10:16 +00:00
Shan Huang
2b31a36bea 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

Change-Id: I9d6ecb6024ce49eef8007458b0d9bf0ff24906c7
2021-08-17 17:28:38 +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
Shan Huang
337e3b1124 Merge "Revert "Revert "Revert "Implement dynamic colors for boot animation."""" 2021-08-13 23:56:24 +00:00
Shan Huang
ad9cf52df9 Revert "Revert "Revert "Implement dynamic colors for boot animation."""
This reverts commit 9f1123cb0d.

Reason for revert: b/196642443 ATV DOA failure.
Bug: 196642443

Change-Id: Iad16e5e8f43850ffa7bf1f26701d85da96fd2cdd
2021-08-13 23:51:58 +00:00
TreeHugger Robot
24beb0a31d Merge "Use ui::LayerStack" 2021-08-13 21:06:32 +00:00
Shan Huang
9f1123cb0d Revert "Revert "Implement dynamic colors for boot animation.""
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
2021-08-13 02:06:22 +00:00
Ady Abraham
92aa9daa10 Revert "Implement dynamic colors for boot animation."
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
2021-08-12 23:55:46 +00:00
Shan Huang
79d079ea49 Implement dynamic colors for boot animation.
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
2021-08-12 19:10:30 +00:00
Lucas Dupin
8eedc0293d 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
2021-08-04 15:44:53 -07:00
Dominik Laskowski
989de3d470 Use ui::LayerStack
Bug: 182939859
Test: Build
Change-Id: I4658471996939713a6330a9c4a7d05cf4c91833a
2021-07-27 21:12:18 -07:00
Greg Kaiser
2ded80094e Revert "Migrate boot animation from GLES 1.0 to GLES2.0."
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
2021-07-19 17:03:27 +00:00
Shan Huang
d711ac4858 Migrate boot animation from GLES 1.0 to GLES2.0.
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
2021-07-13 18:50:46 +08: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