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

Skip to content
Commit a44beb0c authored by Yuri Lin's avatar Yuri Lin Committed by Android Build Coastguard Worker
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 (inlined for security backport)
(cherry picked from commit 1181fd1b)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:dd6c8b4b334af950f7c26d7b8be2e052b2667ea6)
Merged-In: I885f733112af89fe9f255db626fcdc297b1a18c8
Change-Id: I885f733112af89fe9f255db626fcdc297b1a18c8
parent a337d72a
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