Fix vibration effect segment validation regression on allocation count

Change validation of user input parameters to create a VibrationEffect
to avoid build the error message string unless the validation fails, do
fix regression on allocation count perf metric.

Fix: 215985428
Test: fixed regression on metric
Change-Id: Ibbcfd450f0b25b88e071f3781952f24a72473575
4 files changed