Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1181fd1b authored by Yuri Lin's avatar Yuri Lin
Browse files

Limit the size of vibration effects stored on a NotificationChannel

This change adds a cropToLengthOrNull() @hide method to the VibrationEffect interface, implemented only by compositions, to provide a best-effort crop of the number of segments involved in a vibration effect.

For notification channels, changes the max vibration length to 500 from 1000. We probably don't need that much space, and serializing vibration effects means that the data ends up taking up a lot more space than just the array for the vibration pattern.

Adds android.app.notif_channel_crop_vibration_effects bugfix flag that limits when we attempt to crop the vibration effects.

Bug: 345881518
Test: manual with flag on/off; NotificationChannelTest; VibrationEffectTest
Flag: android.app.notif_channel_crop_vibration_effects
Change-Id: I885f733112af89fe9f255db626fcdc297b1a18c8
parent 00c0e676
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment