Commit Graph

219 Commits

Author SHA1 Message Date
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
TreeHugger Robot
f0d034069d Merge "Render boot animation with same size as framebuffer" into rvc-dev am: cbea0ab58f
Original change: undetermined

Change-Id: I99d3870066b4cfc1dd6562d88002042f77af87c0
2020-06-02 11:07:56 +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
57222b5418 Merge "Resize boot animation on display changes" into rvc-dev am: 569b3fbfa7
Change-Id: Iead9fde305bbf421500ec8dc87a8a88bdda94840
2020-05-27 12:23:30 +00: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
9fb2af9114 Merge "Log inotify errors." into rvc-dev am: 8683e2eeba
Change-Id: Iac23802acb09856c45c0d6c37c227624151469e4
2020-05-12 04:47:25 +00:00
Dan Sandler
562d46d592 Log inotify errors.
Bug: 155954661
Test: boot
Change-Id: Ic054ecf6acebba12485926b66d4fb96fa7712547
2020-05-11 17:09:22 -04:00
Suren Baghdasaryan
aeae048088 Replace direct pid writes with setting task profiles
For easy transition from SchedTune to UtilClamp, direct access to these
cgroups should be abstracted by using task profiles. Replace writepid
commands with new task_profiles command.

Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I05f5a082c7e6f43ab94330aede29967e91d1aef9
Merged-In: I05f5a082c7e6f43ab94330aede29967e91d1aef9
2020-05-03 08:12:10 +00:00
Suren Baghdasaryan
610345984d Merge "Replace direct pid writes with setting task profiles" am: 1e4b31dd5d am: 172a573b4b
Change-Id: I4fd59733c8a25f2f138e1735c87eb5c101236001
2020-05-01 17:04:10 +00:00
Suren Baghdasaryan
6acfa351a2 Replace direct pid writes with setting task profiles
For easy transition from SchedTune to UtilClamp, direct access to these
cgroups should be abstracted by using task profiles. Replace writepid
commands with new task_profiles command.

Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I05f5a082c7e6f43ab94330aede29967e91d1aef9
2020-05-01 16:12:36 +00:00
Orion Hodson
18f7afccb6 Merge "Add explicit dependencies on jni_headers" am: c0fe0ae29f am: 6963d8e1c8
Change-Id: I2fdf3826653466d65e3d63fa896d1ec23c5716cd
2020-04-16 10:58:50 +00:00
Orion Hodson
63f06b738d Add explicit dependencies on jni_headers
Preparation for removing implicit include paths for jni.h from soong.

Also remove unnecessary jni.h includes from PathParser.{h,cpp}.

Bug: 152482542
Test: lunch aosp_x86_64 && m checkbuild
Change-Id: Ib18afa3d2c93ed3ce69204286d5177991100fd7e
Exempt-From-Owner-Approval: build refactoring
2020-04-16 08:26:14 +00:00
Glenn Kasten
4ea98d30cc Merge "Deprecate OpenSL ES for Android as of API level 30 (R)" 2020-02-12 18:49:30 +00:00
Glenn Kasten
1c93527d16 Deprecate OpenSL ES for Android as of API level 30 (R)
Bug: 134958169
Test: try with an NDK r21 canary for both R and earlier, and a pre-21 NDK
Change-Id: Ie0a317debd07230d344218c5874f3060dc3ab85f
2020-02-11 13:29:09 -08: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
Miguel de Dios
d0f297fc6a Merge "bootanimation: Change bootanim ioprio to highest in IOPRIO_CLASS_RT" into qt-r1-dev am: f64c698ec7
am: ccdc532426

Change-Id: I8db9e2b526c9a811b6332016d1c1849ed4101a8f
2019-08-13 11:24:51 -07:00
Miguel de Dios
961d48ab5c Merge "bootanimation: Change bootanim ioprio to highest in IOPRIO_CLASS_RT" into qt-r1-dev
am: f64c698ec7

Change-Id: Idf29cbd60434359de2ccfc9664ccec4526685b2c
2019-08-13 11:13:41 -07:00
Miguel de Dios
b717e8e8c2 bootanimation: Change bootanim ioprio to highest in IOPRIO_CLASS_RT
We see cases where bootanim is IO sleeping on boot and its causing
jank. Change the ioprio to the highest in an attempt to reduce this.

Bug: 138459662
Test: manual - flash and factory reset, looking for artifacts in the boot animation
Change-Id: I9734edea37c92e365a2b359a5180303e9b9284f7
2019-08-09 14:06:42 -07:00
Elliott Hughes
938a132791 Remove product_is_iot.
Test: treehugger
Change-Id: I975f86999e4e40c06d6239fbc63e200042d37cc4
2019-07-30 23:29:43 +00:00
Kyeongkab.Nam
15e24878d6 Merge "Fix bootanimation stack overflow"
am: 935d8032c8

Change-Id: If5b2538dc6f2f8639166eaf9c27eb152b8c5419a
2019-07-22 19:57:21 -07:00
Treehugger Robot
935d8032c8 Merge "Fix bootanimation stack overflow" 2019-07-23 02:13:28 +00: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
Steven Moreland
3c8780e832 Merge "libbootanimation: remove unused deps"
am: a367e0e4fa

Change-Id: I7eed8816df090c1cb8d935a79aeeb819ad1a6886
2019-07-16 14:10:21 -07:00
Steven Moreland
d2a323969c libbootanimation: remove unused deps
Bug: 137311188
Test: library still builds
Change-Id: I105cedd7ca6311a767fa627ca4b869e3f077498a
2019-07-11 16:16:31 -07: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
Jiyong Park
aff455f278 Merge "Revert^3 "Delay start of bootanimation until after the Runtime APEX is mounted."" am: 1a14dedcce am: 6623e402b3
am: 1c64a73f91

Change-Id: I1cf5a65959d3a2d4cba292c532afddebf58d9683
2019-03-12 16:50:26 -07:00
Jiyong Park
552ad7b7f1 Revert^3 "Delay start of bootanimation until after the Runtime APEX is mounted."
This reverts commit a6bb8916b0.

Bootanim doesn't need to be delayed because the APEXes from the system partition are now
activated very early in the boot sequence (far before bootanim is started).

See https://android-review.googlesource.com/q/topic:%22apex_earlymount_base%22+(status:open%20OR%20status:merged)

Bug: 125549215
Test: bootanim is started without being delayed
Change-Id: I367b1a5c6bf08dad770cd2bf7f6d67dbf1a813e6
2019-03-12 22:33:44 +00:00
vichang
d26d5ab46b Merge "Revert "Revert "Delay start of bootanimation until after the Runtime APEX is mounted.""" am: c3ae401a98 am: 54b6b9b678
am: 528328cc40

Change-Id: I32a07660cfb35c1130eaec7eccc3935d3a1016b6
2019-02-25 10:14:33 -08:00
vichang
a6bb8916b0 Revert "Revert "Delay start of bootanimation until after the Runtime APEX is mounted.""
This reverts commit 706bf3f628.

Reason for revert: b/124939955. bootanimation depends on libandroidicu in the Runtime APEX.
Bug: 124939955
Change-Id: I2b5a9d74a5f0ae11978ff4b0850dd7e4becb9b88
2019-02-21 14:51:23 +00: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
Jiyong Park
53a5cf55bd Merge changes from topic "cut_dependency" am: 661bb0414e am: 3e40cac16a
am: af3cdce928

Change-Id: Ie86a2c08f5d60be09170076fd82149acb01d23bf
2019-02-12 20:46:35 -08:00
Jiyong Park
706bf3f628 Revert "Delay start of bootanimation until after the Runtime APEX is mounted."
This reverts commit d848183572.

Reason: the static deps to libnativeloader and libnativebridge no longer
exist

Bug: 123403798
Test: Device boots to the UI
Test: bootanimation is shown from the very beginning

Change-Id: I1a3f214b1d9a19520998c7d1f2d288465a831892
2019-02-12 19:35:45 +09: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
Nicolas Geoffray
5a516da019 Merge "Delay start of bootanimation until after the Runtime APEX is mounted." am: 20f1e0ca1d am: 73c257556a
am: 8162d9827f

Change-Id: Idd9b09ea7d500b2eb5af6104b44dd7bc7fd1c5c0
2019-01-22 01:25:17 -08:00
Martin Stjernholm
d848183572 Delay start of bootanimation until after the Runtime APEX is mounted.
It depends on libdexfile_external and libnative{bridge,helper,loader} which
are provided by the Runtime APEX.

Test: flash & boot
Test: atest CtsJdwpTestCases
Bug: 113373927
Change-Id: Id9a78f9adb4c928ab4c91fda0ee3ea4b13eed592
2019-01-21 10:55:30 +00:00
Chih-hung Hsieh
419a2638a2 Merge "Fix/suppress bootanimation google-explicit-constructor warnings" am: 50ee220126 am: b737b4fdb3
am: 05ae400a06

Change-Id: I2380f3e0467e1b9c4a8c36f31a2c4c8f45e893b0
2019-01-02 12:14:41 -08:00
Chih-Hung Hsieh
a08d2c2ee7 Fix/suppress bootanimation google-explicit-constructor warnings
* Add explicit to conversion constructors/operators

Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: Ia6ada49250973d507ae8b10d8f0d7c2d47ee805c
2019-01-02 02:43:37 +00:00
Xin Li
15b123ef45 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd
2018-12-11 14:13:44 -08:00
Dan Willemsen
c15cf1d02e Convert bootanimation to Android.bp
See build/soong/README.md for more information.

Test: cd frameworks/base/cmds/bootanimation; mma
Change-Id: I7e023ffc42f61ce9a215a958fbbd158a6a8352d7
Merged-In: I7e023ffc42f61ce9a215a958fbbd158a6a8352d7
(cherry picked from commit efc3e37c9b)
2018-11-19 23:45:08 -08:00