mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-13 20:48:02 +01:00
still learning magit: check preference before playing sound
This commit is contained in:
parent
99effcac89
commit
c860773234
1 changed files with 5 additions and 3 deletions
|
@ -240,10 +240,12 @@ public class Utils {
|
||||||
|
|
||||||
public static void playNotificationSound( Context context )
|
public static void playNotificationSound( Context context )
|
||||||
{
|
{
|
||||||
|
if ( CommonPrefs.getSoundNotify( context ) ) {
|
||||||
Uri uri = RingtoneManager
|
Uri uri = RingtoneManager
|
||||||
.getDefaultUri( RingtoneManager.TYPE_NOTIFICATION );
|
.getDefaultUri( RingtoneManager.TYPE_NOTIFICATION );
|
||||||
RingtoneManager.getRingtone( context, uri ).play();
|
RingtoneManager.getRingtone( context, uri ).play();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// adapted from
|
// adapted from
|
||||||
// http://stackoverflow.com/questions/2174048/how-to-look-up-a-contacts-name-from-their-phone-number-on-android
|
// http://stackoverflow.com/questions/2174048/how-to-look-up-a-contacts-name-from-their-phone-number-on-android
|
||||||
|
|
Loading…
Add table
Reference in a new issue