fix jira issue N_SE-46545 submit/tizen_2.2/20130716.172739 submit/tizen_2.2/20130717.051922 submit/tizen_2.2/20130717.052938
authorChangyong Jeon <fin10.jeon@samsung.com>
Tue, 16 Jul 2013 07:54:58 +0000 (16:54 +0900)
committerChangyong Jeon <fin10.jeon@samsung.com>
Tue, 16 Jul 2013 07:54:58 +0000 (16:54 +0900)
Change-Id: I923eec9962c091da02942266685e111063673912

Installer/inc/IstInstalledPopup.h
Installer/res/screen-size-normal/IDL_INSTALLED_POPUP.xml
Installer/src/InstallerEntry.cpp
Installer/src/IstInstalledPopup.cpp
Installer/src/IstMainFrame.cpp
InstallerService/src/InstallerService.cpp
InstallerService/src/InstallerServiceEntry.cpp

index d89412d..c376c2a 100644 (file)
@@ -35,7 +35,7 @@ public:
        virtual ~InstalledPopup();
        result Initialize(Tizen::Ui::Control* pTarget);
        result RequestPopup(const Tizen::Base::String& appName, const Tizen::Base::String& installedVersion,
-                       const Tizen::Base::String& currentVersion);
+                       const Tizen::Base::String& currentVersion, bool isLaunchable);
 
        virtual result OnInitializing(void);
        virtual result OnTerminating(void);
@@ -49,6 +49,7 @@ private:
        Tizen::Ui::Control* __pTarget;
        Tizen::Base::String __installMessage;
        Tizen::Base::String __versionMessage;
+       bool __isLaunchable;
 };
 
 #endif /* _IST_INSTALLED_POPUP_H_ */
index 22213a3..3a629a5 100644 (file)
     </Panel>
     <Button id="IDC_BUTTON_REINSTALL" parent="IDC_PANEL">
         <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="::IDS_APINST_BUTTON_REINSTALL" textSize="36.0" verticalAlign="ALIGN_MIDDLE"/>
-        <layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="1" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="209.33331"/>
+        <layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="1" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="209.33333"/>
         <layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="1" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="210.33333"/>
     </Button>
     <Button id="IDC_BUTTON_LAUNCH" parent="IDC_PANEL">
         <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="::IDS_APINST_BUTTON_OPEN" textSize="36.0" verticalAlign="ALIGN_MIDDLE"/>
-        <layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="2" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="209.33331"/>
+        <layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="2" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="209.33333"/>
         <layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="2" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="209.33333"/>
     </Button>
     <Button id="IDC_BUTTON_CANCEL" parent="IDC_PANEL">
         <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="::IDS_ST_SK3_CANCEL" textSize="36.0" verticalAlign="ALIGN_MIDDLE"/>
-        <layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="0" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="210.33331"/>
+        <layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="0" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="210.33333"/>
         <layout height="74.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="0" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="209.33333"/>
     </Button>
     <Label id="IDC_LABEL_VERSION" parent="IDL_INSTALLED_POPUP">
index 6a485f2..456d066 100644 (file)
@@ -40,7 +40,7 @@ OspMain(int argc, char* pArgv[])
        }
 
        result r = Tizen::App::UiApp::Execute(InstallerApp::CreateInstance, &args);
-       AppLogExceptionIf(r != E_SUCCESS, "[%s] Application execution failed", GetErrorMessage(r));
+       AppLogExceptionIf(IsFailed(r), "[%s] Application execution failed", GetErrorMessage(r));
        AppLog("Application finished.");
 
        return static_cast<int>(r);
index ca29d58..ded911e 100644 (file)
@@ -33,6 +33,7 @@ using namespace Tizen::Ui::Controls;
 
 InstalledPopup::InstalledPopup()
        : __pTarget(null)
+       , __isLaunchable(true)
 {
 }
 
@@ -57,7 +58,7 @@ InstalledPopup::Initialize(Tizen::Ui::Control* pTarget)
 
 result
 InstalledPopup::RequestPopup(const Tizen::Base::String& appName, const Tizen::Base::String& installedVersion,
-               const Tizen::Base::String& downloadedVersion)
+               const Tizen::Base::String& downloadedVersion, bool isLaunchable)
 {
        AppResource* pAppResource = AppResource::GetInstance();
        int compare = downloadedVersion.CompareTo(installedVersion);
@@ -88,6 +89,8 @@ InstalledPopup::RequestPopup(const Tizen::Base::String& appName, const Tizen::Ba
        version.Format(version.GetLength() + downloadedVersion.GetLength(), version.GetPointer(), downloadedVersion.GetPointer());
        __versionMessage.Append(version);
 
+       __isLaunchable = isLaunchable;
+
        SetShowState(true);
        return Show();
 }
@@ -116,6 +119,14 @@ InstalledPopup::OnInitializing(void)
        pCancelButton->SetActionId(IDA_BUTTON_CANCEL);
        pCancelButton->AddActionEventListener(*this);
 
+       if (!__isLaunchable)
+       {
+               GridLayout* pLayout = static_cast<GridLayout*>(static_cast<Panel*>(GetControl(IDC_PANEL))->GetLayoutN());
+               pLayout->SetColumnCollapsed(2, true);
+               pLayout->Update();
+               delete pLayout;
+       }
+
        return E_SUCCESS;
 }
 
index 3f70cbe..f93f0c5 100644 (file)
@@ -84,8 +84,11 @@ MainFrame::OnInitializing(void)
                String displayName = pPackageInfo->GetDisplayName();
                AppLogDebug("%ls: It has been already installed.", displayName.GetPointer());
                PackageInfo* pInstalledPackageInfo = pPackageManager->GetPackageInfoN(packageId);
-               r = __pInstalledPopup->RequestPopup(displayName, pInstalledPackageInfo->GetVersion(), pPackageInfo->GetVersion());
+               PackageAppInfo* pMainAppInfo = pInstalledPackageInfo->GetPackageAppInfoN(pInstalledPackageInfo->GetMainAppId());
+               r = __pInstalledPopup->RequestPopup(displayName, pInstalledPackageInfo->GetVersion(),
+                               pPackageInfo->GetVersion(), pMainAppInfo->IsMenuIconVisible());
                delete pInstalledPackageInfo;
+               delete pMainAppInfo;
        }
        else
        {
index f630b2d..e134421 100644 (file)
@@ -170,7 +170,8 @@ InstallerServiceApp::OnPackageInstallationCompleted(const Tizen::App::PackageId&
        notificationManager.Construct();
 
        NotificationRequest request;
-       request.SetIconFilePath(pMainAppInfo->GetAppMenuIconPath());
+       result r = request.SetIconFilePath(pMainAppInfo->GetAppMenuIconPath());
+       AppLogDebugIf(IsFailed(r), "[%s] Failed to set app icon.", GetErrorMessage(r));
        delete pMainAppInfo;
 
        String installTime;
@@ -212,8 +213,8 @@ InstallerServiceApp::OnPackageInstallationCompleted(const Tizen::App::PackageId&
                mainAppId = L"D7eOJquGtL.Installer";
        }
 
-       result r = notificationManager.NotifyByAppId(mainAppId, request);
-       AppLogExceptionIf(r == E_SUCCESS, "[%s] Failed to notify message.", GetErrorMessage(r));
+       r = notificationManager.NotifyByAppId(mainAppId, request);
+       AppLogExceptionIf(IsFailed(r), "[%s] Failed to notify message.", GetErrorMessage(r));
 
        String* pFilePath = dynamic_cast<String*>(__filePathList.GetAt(++__index));
        if (pFilePath)
@@ -268,9 +269,12 @@ InstallerServiceApp::Install(const Tizen::Base::String& filePath)
 
        String appName = __pInfo->GetDisplayName();
 
-       Label* pIconLabel = static_cast<Label*>(__pFrame->GetControl(IDC_LABEL_ICON));
-       pIconLabel->SetBackgroundBitmap(*pAppIcon);
-       delete pAppIcon;
+       if (pAppIcon)
+       {
+               Label* pIconLabel = static_cast<Label*>(__pFrame->GetControl(IDC_LABEL_ICON));
+               pIconLabel->SetBackgroundBitmap(*pAppIcon);
+               delete pAppIcon;
+       }
 
        Label* pNameLabel = static_cast<Label*>(__pFrame->GetControl(IDC_LABEL_NAME));
        pNameLabel->SetText(appName);
index d47b093..61725dc 100644 (file)
@@ -40,7 +40,7 @@ OspMain(int argc, char* pArgv[])
        }
 
        result r = Tizen::App::ServiceApp::Execute(InstallerServiceApp::CreateInstance, &args);
-       AppLogExceptionIf(r == E_SUCCESS, "[%s] Application execution failed", GetErrorMessage(r));
+       AppLogExceptionIf(IsFailed(r), "[%s] Application execution failed", GetErrorMessage(r));
        AppLog("Application finished.");
 
        return static_cast<int>(r);