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
Loading