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

Commit 996e976a authored by Daria Evdokimova's avatar Daria Evdokimova
Browse files

Fixing bug for STOP_TIMER

b/22468335

Change-Id: Iade02428b9aba8f35d93b2ada80fad7daad936c0
parent 5238e2f8
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -303,7 +303,15 @@ public class HandleDeskClockApiCalls extends Activity {
                    final String reason = mContext.getString(R.string.timer_stopped);
                    LogUtils.i(reason);
                    Voice.notifySuccess(mActivity, reason);
                    if (timer.mState == TimerObj.STATE_RUNNING) {
                        timer.setState(TimerObj.STATE_STOPPED);
                    }
                    else {
                        // if the time is up on the timer
                        // restart it and reset the length
                        timer.setState(TimerObj.STATE_RESTART);
                        timer.mTimeLeft = timer.mOriginalLength;
                    }
                    timer.writeToSharedPref(prefs);
                    Events.sendTimerEvent(R.string.action_stop, R.string.label_intent);
                    break;