Rename the class Json to avoid symbol conflicts with Jsoncpp
[platform/core/context/context-provider.git] / src / battery-stats / BatteryUsage.cpp
index c443f62..91ae8c8 100644 (file)
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include "BatteryMonitor.h"
 #include "BatteryUsage.h"
 
 #define SECONDS_IN_A_DAY 86400
@@ -29,8 +30,10 @@ BatteryUsageProvider::~BatteryUsageProvider()
 {
 }
 
-int BatteryUsageProvider::read(Json option, Json *requestResult)
+int BatteryUsageProvider::read(CtxJson1 option, CtxJson1 *requestResult)
 {
+       BatteryMonitor::getInstance()->prepareData();
+
        int startTime;
        int endTime;
        int timeSpan = DEFAULT_TIME_SPAN;