void ApplicationInstance::GetBatteryUsageInfo(const picojson::value& args, picojson::object& out) {
LoggerD("Entered");
-#ifdef TIZEN_MOBILE
CHECK_PRIVILEGE_ACCESS(kPrivilegeAppHistoryRead, &out);
manager_.GetBatteryUsageInfo(args, &out);
-#else
- LogAndReportError(PlatformResult(ErrorCode::NOT_SUPPORTED_ERR, "This feature is not supported on this profile."), &out,
- ("NOT_SUPPORTED_ERR: This feature is not supported on this profile"));
- return;
-#endif
}
void ApplicationInstance::AddAppInfoEventListener(const picojson::value& args, picojson::object& out) {
#include <bundle_internal.h>
#include <appsvc.h>
#include <app_control_internal.h>
+#ifdef TIZEN_MOBILE
#include <context-service/context_history.h>
+#endif
#include "common/current_application.h"
#include "common/logger.h"
void ApplicationManager::GetBatteryUsageInfo(const picojson::value& args, picojson::object* out) {
LoggerD("Entered");
+#ifdef TIZEN_MOBILE
context_history_list_h list = nullptr;
context_history_h handle = nullptr;
context_history_filter_h filter = nullptr;
}
}
ReportSuccess(result_array, *out);
+#else
+ // 20170510 Context API is supported only for mobile profile, other ones would result with NotSupportedError
+ LogAndReportError(PlatformResult(ErrorCode::NOT_SUPPORTED_ERR, "This feature is not supported on this profile."), out,
+ ("NOT_SUPPORTED_ERR: This feature is not supported on this profile"));
+#endif
}
void ApplicationManager::GetAppMetaData(const std::string& app_id, picojson::object* out) {