Fix for AST-24

pull/14/head
Tim Su 16 years ago
parent a168ac5bab
commit f4865e2928

@ -219,10 +219,13 @@ public class Notifications extends BroadcastReceiver {
String notificationPreference = Preferences.getStringValue(R.string.p_rmd_ringtone); String notificationPreference = Preferences.getStringValue(R.string.p_rmd_ringtone);
if(audioManager.getStreamVolume(AudioManager.STREAM_RING) == 0) { if(audioManager.getStreamVolume(AudioManager.STREAM_RING) == 0) {
notification.sound = null; notification.sound = null;
} else if(notificationPreference != null && } else if(notificationPreference != null) {
notificationPreference.length() != 0) { if(notificationPreference.length() > 0) {
Uri notificationSound = Uri.parse(notificationPreference); Uri notificationSound = Uri.parse(notificationPreference);
notification.sound = notificationSound; notification.sound = notificationSound;
} else {
notification.sound = null;
}
} else { } else {
notification.defaults |= Notification.DEFAULT_SOUND; notification.defaults |= Notification.DEFAULT_SOUND;
} }

Loading…
Cancel
Save