[Ring] Play feedback and sound as it is set in alarm 61/143561/2
authorKamil Lipiszko <k.lipiszko@samsung.com>
Thu, 10 Aug 2017 10:09:36 +0000 (12:09 +0200)
committerKamil Lipiszko <k.lipiszko@samsung.com>
Thu, 10 Aug 2017 10:48:11 +0000 (12:48 +0200)
Currently alarm plays sound and vibrates even if it was not set
in edit/create alarm view. This patch fixes this issue.

Change-Id: Ie2f919084a87c062144b61776db0d25255e6542d

clock/src/Model/Ring.cpp

index db0d577..a84a414 100644 (file)
@@ -37,8 +37,10 @@ namespace model {
 
                counter_.Run();
 
-               SoundPlay();
-               VibrationStart();
+               if (!alarm_ || alarm_->GetType() != Alarm::Type::VIBRATION)
+                       SoundPlay();
+               if (!alarm_ || alarm_->GetType() != Alarm::Type::SOUND_ONLY)
+                       VibrationStart();
 
                return true;
        }