Added constraints to package in sensorEvent