still learning magit: check preference before playing sound

This commit is contained in:
Eric House 2016-04-14 21:50:18 -07:00
parent 99effcac89
commit c860773234

View file

@ -240,10 +240,12 @@ public class Utils {
public static void playNotificationSound( Context context )
{
if ( CommonPrefs.getSoundNotify( context ) ) {
Uri uri = RingtoneManager
.getDefaultUri( RingtoneManager.TYPE_NOTIFICATION );
RingtoneManager.getRingtone( context, uri ).play();
}
}
// adapted from
// http://stackoverflow.com/questions/2174048/how-to-look-up-a-contacts-name-from-their-phone-number-on-android