#include "common/filesystem/filesystem_provider.h"
#include "common/logger.h"
#include "common/scope_exit.h"
+#include "common/tools.h"
namespace extension {
namespace notification {
const std::string& value_str = FromJson<std::string>(noti_obj, key.c_str());
std::string real_path = FilesystemProvider::Create().GetRealPath(value_str);
+ CHECK_STORAGE_ACCESS_AND_RETURN(real_path);
+
PlatformResult status = SetImage(noti_handle, type, real_path);
CHECK_ERROR(status);
}
const std::string& text = JsonCast<std::string>(item);
std::string real_path = FilesystemProvider::Create().GetRealPath(text);
+ CHECK_STORAGE_ACCESS_AND_RETURN(real_path);
+
PlatformResult status = SetImage(noti_handle, map.at(idx), real_path);
CHECK_ERROR(status);