Do not vibrate in vibrate mode if ringtone is silent

An empty string as the ringtone URI was triggering the system
vibration while in vibrate mode.

Bug: 7624838
Change-Id: Ide1cb2d8ac5d1295c18770bd053dd1cd0a50feb0
This commit is contained in:
Scott Kennedy 2012-11-28 16:59:05 -08:00
parent 84965bbcfb
commit 722b7bc29d

View File

@ -766,7 +766,7 @@ public class NotificationController {
defaults |= Notification.DEFAULT_VIBRATE;
}
builder.setSound((ringtoneUri == null) ? null : Uri.parse(ringtoneUri))
builder.setSound(TextUtils.isEmpty(ringtoneUri) ? null : Uri.parse(ringtoneUri))
.setDefaults(defaults);
}