diff options
| author | Danny Baumann <dannybaumann@web.de> | 2013-02-01 10:43:13 +0100 |
|---|---|---|
| committer | Danny Baumann <dannybaumann@web.de> | 2013-02-01 10:43:13 +0100 |
| commit | 1bd6ff61e188c09d6093a79628f9e6529963da12 (patch) | |
| tree | 89148aa38557bf1a127d621cc52d7f425e416ee0 | |
| parent | c7f62ee8726df828febcd7fd2dcac2250e58824a (diff) | |
| download | frameworks_base-1bd6ff61e188c09d6093a79628f9e6529963da12.zip frameworks_base-1bd6ff61e188c09d6093a79628f9e6529963da12.tar.gz frameworks_base-1bd6ff61e188c09d6093a79628f9e6529963da12.tar.bz2 | |
Fix coding style.
Change-Id: Ia3d84f0ed6174234e07b1a5faa244cd63b4f6b4c
| -rwxr-xr-x | services/java/com/android/server/NotificationManagerService.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java index c844a6e..24da4c9 100755 --- a/services/java/com/android/server/NotificationManagerService.java +++ b/services/java/com/android/server/NotificationManagerService.java @@ -1246,8 +1246,8 @@ public class NotificationManagerService extends INotificationManager.Stub final boolean convertSoundToVibration = !hasCustomVibrate && (useDefaultSound || notification.sound != null) - && (audioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE) - && (Settings.System.getInt(mContext.getContentResolver(), Settings.System.NOTIFICATION_CONVERT_SOUND_TO_VIBRATION, 1) != 0); + && shouldConvertSoundToVibration() + && (audioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE); // The DEFAULT_VIBRATE flag trumps any custom vibration. final boolean useDefaultVibrate = @@ -1299,6 +1299,11 @@ public class NotificationManagerService extends INotificationManager.Stub idOut[0] = id; } + private boolean shouldConvertSoundToVibration() { + return Settings.System.getInt(mContext.getContentResolver(), + Settings.System.NOTIFICATION_CONVERT_SOUND_TO_VIBRATION, 1) != 0; + } + private boolean inQuietHours() { if (mQuietHoursEnabled && (mQuietHoursStart != mQuietHoursEnd)) { // Get the date in "quiet hours" format. |
