Popup p(1);
p.setMessage(message);
- p.setTitle(" Malware detected");
- p.setHeader(" Malware which is harm your phone is detected.");
- p.setBody(FORMAT(" - Risk : " << risk << " (" << d.malwareName << ")"));
- p.setFooter(" Processing is prohibited to protect your phone.");
+ p.setTitle(" Malware detected");
+ p.setHeader(" Malware which is harm your phone is<br>"
+ " detected.");
+ p.setBody(FORMAT(" - Risk : " << risk << " (" << d.malwareName << ")"));
+ p.setFooter(" If you really want to process anyway,<br>"
+ " tap ignore.");
p.setText(p.m_buttons[0], "OK");
+ p.setText(p.m_buttons[1], "Ignore");
p.m_types.emplace_back(
static_cast<int>(CSR_CS_USER_RESPONSE_PROCESSING_DISALLOWED));
+ p.m_types.emplace_back(
+ static_cast<int>(CSR_CS_USER_RESPONSE_PROCESSING_ALLOWED));
p.callbackRegister(p.m_buttons[0], &p.m_types[0]);
+ p.callbackRegister(p.m_buttons[1], &p.m_types[1]);
p.callbackRegister(p.m_hypertext, d.detailedUrl);
p.run();
Popup p(3);
p.setMessage(message);
- p.setTitle(" Malware detected");
- p.setHeader(" Malware which is harm your phone is detected.");
+ p.setTitle(" Malware detected");
+ p.setHeader(" Malware which is harm your phone is<br>"
+ " detected.");
p.setBody(FORMAT(
- " - File name : " << fileName << "<br>" <<
- " - Path : " << extraPath << "<br>" <<
- " - Risk : " << risk << " (" << d.malwareName << ")"));
+ " - File name : " << fileName << "<br>" <<
+ " - Path : " << extraPath << "<br>" <<
+ " - Risk : " << risk << " (" << d.malwareName << ")"));
p.setFooter(
- " Tap Delete to delete infected files and<br>"
- " protect your phone. If you really want to<br>"
- " process anyway, tap Ignore.");
+ " Tap Delete to delete infected files and<br>"
+ " protect your phone. If you really want to<br>"
+ " process anyway, tap Ignore.");
p.setText(p.m_buttons[0], "OK");
p.setText(p.m_buttons[1], "Ignore");
Popup p(3);
p.setMessage(message);
- p.setTitle(" Malware detected");
- p.setHeader(" Malware which is harm your phone is detected.");
+ p.setTitle(" Malware detected");
+ p.setHeader(" Malware which is harm your phone<br>"
+ " is detected.");
p.setBody(FORMAT(
- " App name : " << info.getLabel() << "<br>" <<
- " Version : " << info.getVersion() << "<br>" <<
- " Risk : " << risk << " (" << d.malwareName << ")"));
+ " App name : " << info.getLabel() << "<br>" <<
+ " Version : " << info.getVersion() << "<br>" <<
+ " Risk : " << risk << " (" << d.malwareName << ")"));
p.setIcon(info.getIconPath());
p.setFooter(
- " Tap Uninstall to uninstall infected<br>"
- " application and protect your phone.<br>"
- " If you really want to process anyway, tap Ignore.");
+ " Tap Uninstall to uninstall infected<br>"
+ " application and protect your phone. If<br>"
+ " you really want to process anyway, tap<br>"
+ " Ignore.");
p.setText(p.m_buttons[0], "OK");
p.setText(p.m_buttons[1], "Ignore");
Popup p(1);
p.setMessage(message);
- p.setTitle(" Malware detected");
- p.setHeader(" Malware which is harm your phone is detected.");
- p.setBody(FORMAT(" - Risk : " << "High" << " (" << d.malwareName << ")"));
- p.setFooter(" Processing is prohibited to protect your phone.");
+ p.setTitle(" Malware detected");
+ p.setHeader(" Malware which is harm your phone is<br>"
+ " detected.");
+ p.setBody(FORMAT(" - Risk : " << "High" << " (" << d.malwareName << ")"));
+ p.setFooter(" Processing is prohibited to protect<br>"
+ " your phone.");
p.setText(p.m_buttons[0], "OK");
split(d.targetName, fileName, extraPath);
p.setMessage(message);
- p.setTitle(" Malware detected");
- p.setHeader(" Malware which is harm your phone is detected.");
+ p.setTitle(" Malware detected");
+ p.setHeader(" Malware which is harm your phone is<br>"
+ " detected.");
p.setBody(FORMAT(
- " - File name : " << fileName << "<br>" <<
- " - Path : " << extraPath << "<br>" <<
- " - Risk : " << "High" << " (" << d.malwareName << ")"));
+ " - File name : " << fileName << "<br>" <<
+ " - Path : " << extraPath << "<br>" <<
+ " - Risk : " << "High" << " (" << d.malwareName << ")"));
p.setFooter(
- " Tap Delete to delete infected files and<br>"
- " protect your phone.");
+ " Tap Delete to delete infected files and<br>"
+ " protect your phone.");
p.setText(p.m_buttons[0], "OK");
p.setText(p.m_buttons[1], "Delete");
Popup p(2);
p.setMessage(message);
- p.setTitle(" Malware detected");
- p.setHeader(" Malware which is harm your phone is detected.");
+ p.setTitle(" Malware detected");
+ p.setHeader(" Malware which is harm your phone is<br>"
+ " detected.");
p.setIcon(info.getIconPath());
p.setBody(FORMAT(
- " App name : " << info.getLabel() << "<br>" <<
- " Version : " << info.getVersion() << "<br>" <<
- " Risk : " << "High" << " (" << d.malwareName << ")"));
+ " App name : " << info.getLabel() << "<br>" <<
+ " Version : " << info.getVersion() << "<br>" <<
+ " Risk : " << "High" << " (" << d.malwareName << ")"));
p.setFooter(
- " Tap Uninstall to uninstall infected<br>"
- " application and protect your phone.");
+ " Tap Uninstall to uninstall infected<br>"
+ " application and protect your phone.");
p.setText(p.m_buttons[0], "OK");
p.setText(p.m_buttons[1], "Uninstall");
p.setMessage(message);
p.setTitle("Block malicious URL");
- p.setHeader(" This website may harm your phone.");
+ p.setHeader(" This website may harm your phone.");
p.setBody(FORMAT(
- " - URL : " << item.url << "<br>" <<
- " - Risk : " << risk));
+ " - URL : " << item.url << "<br>" <<
+ " - Risk : " << risk));
p.setFooter(
- " Accessing to this URL is prohibited to<br>"
- " protect your phone.");
+ " Accessing to this URL is prohibited to<br>"
+ " protect your phone.");
p.setText(p.m_buttons[0], "OK");
p.setTitle("Block malicious URL");
p.setHeader(" This website may harm your phone.");
p.setBody(FORMAT(
- " - URL : " << item.url << "<br>" <<
- " - Risk : " << "High"));
+ " - URL : " << item.url << "<br>" <<
+ " - Risk : " << "High"));
p.setFooter(
" If you really want to process anyway,<br>"
" tap View");
// Set popup properties.
m_popup = elm_popup_add(m_win);
+ elm_popup_align_set(m_popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
evas_object_size_hint_weight_set(m_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
// Wrap objects with box.
m_box = elm_box_add(m_popup);
- m_header = elm_label_add(m_box);
+ evas_object_size_hint_weight_set(m_box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_box_padding_set(m_box, 10, 10);
+ m_header = elm_label_add(m_box);
+ evas_object_size_hint_weight_set(m_header, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(m_header, EVAS_HINT_FILL, 0);
elm_box_pack_end(m_box, m_header);
evas_object_show(m_header);
evas_object_show(m_icon);
m_body = elm_label_add(m_subBox);
+ evas_object_size_hint_weight_set(m_body, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(m_body, EVAS_HINT_FILL, 0);
elm_box_pack_end(m_subBox, m_body);
evas_object_show(m_body);
// This label is for linking to webview.
m_hypertext = elm_button_add(m_box);
elm_object_text_set(m_hypertext, "More information");
+ evas_object_size_hint_weight_set(m_hypertext, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_align_set(m_hypertext, EVAS_HINT_FILL, 0);
elm_box_pack_end(m_box, m_hypertext);
evas_object_show(m_hypertext);
elm_object_style_set(m_hypertext, "anchor");
+ elm_object_focus_set(m_hypertext, EINA_FALSE);
m_footer = elm_label_add(m_box);
evas_object_size_hint_align_set(m_footer, EVAS_HINT_FILL, 0);
void Popup::setHeader(const std::string &header) noexcept
{
- setText(m_header, header);
+ setText(m_header, "<wrap = word>" + header + "</wrap>");
}
void Popup::setBody(const std::string &body) noexcept
{
- setText(m_body, body);
+ setText(m_body, "<wrap = word>" + body + "</wrap>");
}
void Popup::setFooter(const std::string &footer) noexcept
{
- setText(m_footer, "<br>" + footer);
+ setText(m_footer, "<br>""<wrap = word>" + footer + "</wrap>");
}
void Popup::setMessage(const std::string &msg) noexcept
CsDetected d;
d.targetName.clear(); // data's target name should be empty
- d.malwareName = "dummy malware in data";
+ d.malwareName = "dummy malware";
d.detailedUrl = "http://detailedurl/cs_prompt_data";
d.severity = CSR_CS_SEVERITY_MEDIUM;
EXCEPTION_GUARD_START
CsDetected d;
+
+ Test::uninstall_app(TEST_TPK_PKG_ID);
+ ASSERT_INSTALL_APP(TEST_TPK_PATH, TEST_TPK_TYPE);
+
// message pkg is for get icon temporary.
- d.pkgId = "org.tizen.message";
- d.malwareName = "dummy malware in app";
+ d.pkgId = TEST_TPK_PKG_ID;
+ d.malwareName = "dummy malware";
d.detailedUrl = "http://detailedurl/cs_prompt_app";
d.severity = CSR_CS_SEVERITY_MEDIUM;
CsDetected d;
d.targetName.clear(); // data's target name should be empty
- d.malwareName = "dummy malware in data";
+ d.malwareName = "dummy malware";
d.detailedUrl = "http://detailedurl/cs_notify_data";
d.severity = CSR_CS_SEVERITY_HIGH;
ASSERT_INSTALL_APP(TEST_WGT_PATH, TEST_WGT_TYPE);
d.pkgId = TEST_WGT_PKG_ID;
- d.malwareName = "dummy malware in app";
+ d.malwareName = "dummy malware";
d.detailedUrl = "http://detailedurl/cs_notify_app";
d.severity = CSR_CS_SEVERITY_HIGH;