#include <cstdio>
#include <cstdlib>
-#include <vector>
#include <new>
#include <typeinfo>
#include <unique_ptr.h>
#include "FApp_AppArg.h"
#include "FApp_AppMessageImpl.h"
#include "FApp_Aul.h"
-#include "FAppPkg_PackageManagerImpl.h"
using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
using namespace Tizen::Base::Utility;
-using namespace Tizen::App::Package;
extern "C" int appsvc_allow_transient_app(bundle*, Ecore_X_Window);
static const char BUNDLE_KEY_PREFIX_AUL[] = "__AUL_";
static const char BUNDLE_KEY_PREFIX_SERVICE[] = "__APP_SVC_";
static const char BUNDLE_KEY_PREFIX_OSP[] = "__OSP_";
+static const char BUNDLE_KEY_PREFIX_UG[] = "__UG_";
const char TIZEN_NOTIFICATION_DATA[] = "http://tizen.org/appcontrol/data/notification";
+const wchar_t LEGACY_OPERATION_MAIN[] = L"osp.operation.MAIN";
_AppArg::_AppArg(void)
__pBundle = bundle_create();
SysTryReturnResult(NID_APP, __pBundle != null, E_OUT_OF_MEMORY, "Bundle creation failure.");
- return CreateLaunchArg(__pBundle, argText);
+ return CreateNotificationArg(__pBundle, argText);
}
case _APP_HANDLER_LAUNCH_NORMAL:
pList->Add(*new (std::nothrow) String(LEGACY_LAUNCH_REASON_NORMAL));
- pList->Add(*new (std::nothrow) String(L"osp.operation.MAIN"));
+ pList->Add(*new (std::nothrow) String(LEGACY_OPERATION_MAIN));
break;
default:
return true;
}
+ if (strncmp(BUNDLE_KEY_PREFIX_UG, pKey, strlen(BUNDLE_KEY_PREFIX_UG)) == 0)
+ {
+ return true;
+ }
+
return false;
}
result
-_AppArg::CreateLaunchArg(bundle* b, const String& arg)
+_AppArg::CreateNotificationArg(bundle* b, const String& arg)
{
SysAssertf(b != null, "Valid bundle should be supplied");
if (!arg.IsEmpty())
{
- const char** pSa = new (std::nothrow) const char*[1];
- SysTryReturnResult(NID_APP, pSa != null, E_OUT_OF_MEMORY, "Insufficient memory.");
- pSa[0] = _StringConverter::CopyToCharArrayN(arg);
- bundle_add_str_array(pb, OSP_K_ARG, pSa, 1);
-
- bundle_add(pb, TIZEN_NOTIFICATION_DATA, pSa[0]);
-
- delete[] pSa[0];
- delete[] pSa;
+ std::unique_ptr<char[]> pStr(_StringConverter::CopyToCharArrayN(arg));
+ bundle_add(pb, TIZEN_NOTIFICATION_DATA, pStr.get());
}
bundle_add(pb, OSP_K_LAUNCH_TYPE, OSP_V_LAUNCH_TYPE_LAUNCH);
SysTryReturn(NID_APP, pList != null, null, E_OUT_OF_MEMORY, "ArrayList creation failure.");
String* pData = new (std::nothrow) String(LEGACY_LAUNCH_REASON_NORMAL);
SysTryReturn(NID_APP, pData != null, null, E_OUT_OF_MEMORY, "ArrayList creation failure.");
- String* pData2 = new (std::nothrow) String(L"osp.operation.MAIN");
+ String* pData2 = new (std::nothrow) String(LEGACY_OPERATION_MAIN);
SysTryReturn(NID_APP, pData2 != null, null, E_OUT_OF_MEMORY, "ArrayList creation failure.");
pList->Construct();