app/watchdog: Always use resetTimeRemaining

The SetWatchdog function currently sets the intervals and then the time
remaining on the watchdog. It uses the user provided interval for both
values. Recently, the watchdog was extended to allow for the interval to
be capped above a certain value to prevent the user from setting
watchdogs that are known to be too short. In order to keep the
timeRemaining in sync with the value in the watchdog, just use the
resetTimeRemaining() function which reads the current interval to set
the timeRemaining.

Change-Id: I3f15030a85c625fcb1ed8040add03496618a5ece
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/app/watchdog.cpp b/app/watchdog.cpp
index f97c45b..cb71115 100644
--- a/app/watchdog.cpp
+++ b/app/watchdog.cpp
@@ -247,7 +247,7 @@
         // Set the new interval and the time remaining deci -> mill seconds
         const uint64_t interval = initialCountdown * 100;
         wd_service.setInterval(interval);
-        wd_service.setTimeRemaining(interval);
+        wd_service.resetTimeRemaining(false);
 
         // Mark as initialized so that future resets behave correctly
         wd_service.setInitialized(true);
diff --git a/app/watchdog_service.cpp b/app/watchdog_service.cpp
index a929cb6..3534e89 100644
--- a/app/watchdog_service.cpp
+++ b/app/watchdog_service.cpp
@@ -198,8 +198,3 @@
 {
     setProperty("Interval", interval);
 }
-
-void WatchdogService::setTimeRemaining(uint64_t timeRemaining)
-{
-    setProperty("TimeRemaining", timeRemaining);
-}
diff --git a/app/watchdog_service.hpp b/app/watchdog_service.hpp
index ed64a3c..141bdb7 100644
--- a/app/watchdog_service.hpp
+++ b/app/watchdog_service.hpp
@@ -92,13 +92,6 @@
      */
     void setInterval(uint64_t interval);
 
-    /** @brief Sets the value of the timeRemaining property on the host
-     *         watchdog
-     *
-     *  @param[in] timeRemaining - The new timeRemaining value
-     */
-    void setTimeRemaining(uint64_t timeRemaining);
-
   private:
     /** @brief sdbusplus handle */
     sdbusplus::bus::bus bus;