summaryrefslogtreecommitdiff
path: root/cmds/bootanimation/BootAnimation.cpp
AgeCommit message (Collapse)Author
2021-01-11Support for showing percent progress in boot animation.Nicolas Geoffray
Bug: 175686819 Test: boot with manual changes updating the progress Change-Id: I2d936e3391f56796308c90deb39ecacc58797721 Merged-In: I2d936e3391f56796308c90deb39ecacc58797721
2020-12-01Send shutdown callback only during animation destructionPhilip Junker
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-10-19Support animation parts fading outYegor Malyshev
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-05-29Render boot animation with same size as framebufferMarin Shalamanov
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-27Merge "Resize boot animation on display changes" into rvc-devTreeHugger Robot
2020-05-27Resize boot animation on display changesMarin Shalamanov
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-11Log inotify errors.Dan Sandler
Bug: 155954661 Test: boot Change-Id: Ic054ecf6acebba12485926b66d4fb96fa7712547
2020-01-29Adapt SurfaceControl to libgui API for display infoDominik Laskowski
Bug: 144601064 Test: dumpsys display Change-Id: I477e0e3126cc15eb5f120610b4e6b6b1568df389
2020-01-29Merge "Add a way to customize boot animation during userspace reboot" am: ↵Automerger Merge Worker
3d0bb1d650 am: ab74c5633a am: d7c39e5ca9 Change-Id: I7aa06e75dfe7fd8b7bb29830ea46ebcbe96b536a
2020-01-28Add a way to customize boot animation during userspace rebootNikita Ioffe
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-17Merge "Rename system property"Huihong Luo
2020-01-17Rename system propertyHuihong Luo
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-07Use ui::Rotation in libgui callsDominik Laskowski
Bug: 144601064 Test: Build Change-Id: I46d6974e67dcae2d42766f08c899c56dddd795e9
2019-12-03BootAnimation: Minor whitespace fixGreg Kaiser
Test: TreeHugger Change-Id: Iccedcb9bb5751fc0aecbf460be0062ea86fdaccb
2019-12-03BootAnimation: Avoid memory leak in error caseGreg Kaiser
If we fail preloadZip(), we release the animation prior to returning. Test: TreeHugger Change-Id: I632c052ef22b2a7192b516de5726bf4e74544f7a
2019-08-29Add multi-display support for boot animationHuihong Luo
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-07-22Merge "Fix bootanimation stack overflow"Kyeongkab.Nam
am: 935d8032c8 Change-Id: If5b2538dc6f2f8639166eaf9c27eb152b8c5419a
2019-07-18Fix bootanimation stack overflowKyeongkab.Nam
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-05-29Look for bootanimation in apex-moduleAnders Fridlund
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-20Write system property persist.sys.provisionedBeverly
When the device is provisioned, write a system property to indicate device provisioned. Test: manual Bug: 131702833 Change-Id: I7ade97770658b3aa67d642446dd66c410ec4c5a3
2019-03-24[BootAnimation] Modernize codebase by replacing NULL with nullptrYi Kong
Fixes -Wzero-as-null-pointer-constant warning. Test: m Bug: 68236239 Change-Id: I3d1d08ce91b351227dad11f0ac0302832b9563b4
2019-02-14Preload zip before waiting for surface flingerHuihong Luo
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-04Generalize physical display managementDominik Laskowski
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
2018-10-23BootAnimation: Use system logWei Wang
To match the rest of booting log in system_server, e.g. SystemServerTiming and SystemUIBootTiming. Test: build Bug: 118241273 Change-Id: Idf6aca0c503b85c645a7c3d5f430c321a8d83cca
2018-08-22Merge "BootAnimation: Fix boot animation with hidden cutout" into pi-dev am: ↵Jorim Jaggi
e387ce18d8 am: 2c68abc9fc Change-Id: I1a0db9f30f7270d49136fa3984dc8d9633ead690
2018-08-22BootAnimation: Fix boot animation with hidden cutoutAdrian Roos
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-07-24Fix use-after-free: release the animation after we're done with itDamien Bargiacchi
Bug: 64504131 Change-Id: Ibddbc37d96957eeec63035d7f045a8982fb04254
2018-02-28Merge "Don't use cutils/Atomic.h" am: 07735797a2 am: a272d540d8Steven Moreland
am: 0f4ca4a5c0 Change-Id: I4b9798b39d890537f888415b5ac283227970e4de
2018-02-23Don't use cutils/Atomic.hSteven Moreland
Test: builds Change-Id: I74485a5cbecb8710714f7bf3e54da61dd787838f
2018-01-30Load bootanimation from /product partitionJaekyun Seok
Bug: 72667033 Test: tested loading /product/media/bootanimation.zip after moving it from from /system/media to /product/media on sailfish Change-Id: I10612dd77da7c2c67b02b00b7f0eb2b28e49cc98
2017-10-09Use new SurfaceFlinger transaction API.Robert Carr
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-06-19Allow IO During boot process, BootActions.Ed Coyne
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-05-31Refactor bootanimation into a shared lib.Ed Coyne
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-04-18bitmaps and pixelrefs no longer need lock/unlockMike Reed
Test: covered by CtsGraphicsTestCases and hwui_unit_tests Change-Id: I42a25961a2eb3755d2fd22a617aa21a24ec0994f
2017-04-04show different timing log for shutdown animationKeun-young Park
bug: 36873098 Test: reboot and check log Change-Id: Ic3adaba383cc29dba039a7fb5adcb01d4c0c963b
2017-04-03support shutdown animation from bootanimKeun-young Park
- 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-02-07BootAnimation: change log format when animation startsWei Wang
Bug: 34499826 Test: on marlin Change-Id: I719485d399406abc08360620c09d90f4b87934a6
2017-02-02BootAnimation: Add log when animation startsWei Wang
Bug: 34499826 Test: on marlin Change-Id: I04e4663daf4b30e2ab3c1ddda215127cf7faef9f
2017-01-31Initialize bootanimation sound on separate threadGeoffrey Pitsch
Blocks when it's time to play the first sound. Bug: 30189706 Test: on marlin Change-Id: Ib3666fbfb5f109c633ed59edad4a283b8ada8ae2
2016-12-06Centre clock text on visible characters instead of : character am: ↵Damien Bargiacchi
45a7644004 am: 04f17be3e6 am: e2ca6b465e Change-Id: If3edabead7835e9949f1d1601cbe7cb59c0bbc4c
2016-12-06Centre clock text on visible characters instead of : characterDamien Bargiacchi
am: 45a7644004 Change-Id: Ibb152f2217297ab0b0aa1ec622e59ae8ae815d59
2016-12-05Centre clock text on visible characters instead of : characterDamien Bargiacchi
Bug: 33340845 Change-Id: I235ad7c6aafc62daa55242f81df2d076f27c56df
2016-11-22Merge remote-tracking branch 'goog/cw-f-dev' into fix_mergerBaligh Uddin
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-01Allow boot clock to be toggled between 12 and 24 hour format am: 9071db1d37 ↵Damien Bargiacchi
am: 3400dffcad am: bb2e8993f0 Change-Id: I8f4ccc9e82e5539c615a8388a002d5ab196f77f9
2016-11-01Allow boot clock to be toggled between 12 and 24 hour format am: 9071db1d37Damien Bargiacchi
am: 3400dffcad Change-Id: Ic4df64d163845547416ef1280ae2ba2f1b41efda
2016-10-28Allow boot clock to be toggled between 12 and 24 hour formatDamien Bargiacchi
Bug: 32461548 Change-Id: I414192e6d9f3ae44267f4a360e35647f18c420b4
2016-09-07resolve merge conflicts of 6574d9c to masterDamien Bargiacchi
Change-Id: I9b97396a03f80507d71a52d281f88f686712b129
2016-09-08Allow custom fonts in the boot animaiton zip fileDamien Bargiacchi
am: 0e3d2ab6d2 Change-Id: I13d1e6a707ad941a267b89483e6dc029398a2d82
2016-09-05Allow custom fonts in the boot animaiton zip fileDamien Bargiacchi
Change the font format to be a 16x6 grid of characters Bug: 29580875 Change-Id: Ia468307cb9770436e8ae865c91acda23a71bde05
2016-08-11Suppress Boot sound for non-standard scenarios. am: 290c4350ed am: 854f8cecf7Geoffrey Pitsch
am: 9e7b3f657f Change-Id: Id7d1cb29fa1e1a416d56b4b16a73576a458216c4