[Application] move app ID getting on instance
authorJongHeon Choi <j-h.choi@samsung.com>
Thu, 11 Jun 2015 04:47:45 +0000 (13:47 +0900)
committerJongHeon Choi <j-h.choi@samsung.com>
Tue, 16 Jun 2015 05:24:32 +0000 (14:24 +0900)
Change-Id: I204cce87740e1b1a7c8630d16efaee616bd88751

src/application/application_extension.cc
src/application/application_instance.cc

index a943c6975a094c5623e87f055992d130263cc387..1379e0c529bfc79f1e63678c222fdcf848ce85c7 100755 (executable)
@@ -35,12 +35,6 @@ common::Extension* CreateExtension() {
   LoggerD("Enter");
   ApplicationExtension* e = new ApplicationExtension();
 
-  if (e->app_id().empty()) {
-    LoggerD("Application extension will not be created.");
-    delete e;
-    return nullptr;
-  }
-
   return e;
 }
 
index 5a48f9bd4d95502834a8fd01861d7facc36237ea..4690dd9406f0675672b1b739563ba5e9f96fb670 100755 (executable)
@@ -33,6 +33,11 @@ ApplicationInstance::ApplicationInstance() :
   app_id_ = common::GetCurrentExtension()->GetRuntimeVariable("app_id", 64);
   LoggerD("app_id: %s", app_id_.c_str());
 
+  if (app_id_.empty()) {
+    LoggerE("app_id_ is empty. Application instance will not be created.");
+    //return PlatformResult(ErrorCode::NOT_FOUND_ERR, "Cannot find caller.");
+  }
+
   using std::placeholders::_1;
   using std::placeholders::_2;