diff options
author | Pawel Niemirski <p.niemirski@samsung.com> | 2017-05-31 13:16:24 +0200 |
---|---|---|
committer | Pawel Niemirski <p.niemirski@samsung.com> | 2017-06-01 15:30:15 +0200 |
commit | 8382e2b0534787469baf76161e3899888cf130b1 (patch) | |
tree | c4939b89a926e664b55278f29e879c000fe6db65 | |
parent | 9e4fba5aca67a2614f30371abf12022074007022 (diff) | |
download | browser-8382e2b0534787469baf76161e3899888cf130b1.tar.gz browser-8382e2b0534787469baf76161e3899888cf130b1.tar.bz2 browser-8382e2b0534787469baf76161e3899888cf130b1.zip |
fixup! Generate UUID for PWA icon file name
[Problem] Missing app icon on splash screen
[Cause] In original patch, we've changed icon file names to UUID numbers,
but SplashScreen class still uses original icon names.
[Solution] Setting |pwa_icon_src| to local file instead of internet url, so
it can be used by SplashScreen in order to display icon.
[Issue] http://suprem.sec.samsung.net/jira/browse/RWASP-1485
[Verify] Open any PWA app. An icon should be displayed on splash screen.
Change-Id: I43b2e2f5f4548fc16e8f8dd2d0be90deede07053
Signed-off-by: Pawel Niemirski <p.niemirski@samsung.com>
-rwxr-xr-x | services/SimpleUI/SplashScreen.cpp | 4 | ||||
-rwxr-xr-x | services/WebEngineService/WebView.cpp | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/services/SimpleUI/SplashScreen.cpp b/services/SimpleUI/SplashScreen.cpp index c39dab6..4f2c161 100755 --- a/services/SimpleUI/SplashScreen.cpp +++ b/services/SimpleUI/SplashScreen.cpp @@ -68,9 +68,7 @@ void SplashScreen::show(const ProgressiveWebApp& pwa) if (pwa.isActive()) { evas_object_move(m_image, 0.5 * width - 128., 0.5 * height - 128.); width = height = 256; - image_path = std::string(app_get_shared_data_path()); - image_path += pwa.getPWAinfo().icon.substr( - pwa.getPWAinfo().icon.find_last_of("/"), pwa.getPWAinfo().icon.length()); + image_path = pwa.getPWAinfo().icon; } else { image_path = std::string(ICONDIR); image_path += std::string(*landscape ? "/landscape.png" : "/portrait.png"); diff --git a/services/WebEngineService/WebView.cpp b/services/WebEngineService/WebView.cpp index 3e7790e..5a72097 100755 --- a/services/WebEngineService/WebView.cpp +++ b/services/WebEngineService/WebView.cpp @@ -467,8 +467,7 @@ void WebView::setPWAData(const std::string& serviceWorkerURL) + "&pwa_bg_b=" + std::to_string(m_manifestData.background_color.b) + "&pwa_bg_a=" + std::to_string(m_manifestData.background_color.a) + "&pwa_icon_count=" + std::to_string(m_manifestData.icons_count) - + "&pwa_icon_src=" + std::string(text = curl_easy_escape(curl, - m_manifestData.icons.begin()->src.c_str(), m_manifestData.icons.begin()->src.length())); + + "&pwa_icon_src=" + std::string(text = curl_easy_escape(curl, s_icon.c_str(), s_icon.length())); #if PWE_SHUB if (!serviceWorkerURL.empty()) retVal += "&pwa_serviceWorkerUri=" + serviceWorkerURL; |