Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1bd6ff61 authored by Danny Baumann's avatar Danny Baumann
Browse files

Fix coding style.

Change-Id: Ia3d84f0ed6174234e07b1a5faa244cd63b4f6b4c
parent c7f62ee8
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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.