Revert "[3.0] Handle NULL pointer for UTC on target" 58/55858/2
authortaeyoon <taeyoon0.lee@samsung.com>
Wed, 30 Dec 2015 02:30:01 +0000 (11:30 +0900)
committertaeyoon <taeyoon0.lee@samsung.com>
Fri, 15 Jan 2016 02:26:19 +0000 (11:26 +0900)
This reverts commit 0db19503546d3ab305f2f91be3a24a52d4edb778.

Change-Id: I8d6567b41fc6fc6fa444ac10284a9ca3cac94fdc

adaptors/common/virtual-keyboard-impl.cpp

index c38f276..bc16c05 100644 (file)
@@ -134,16 +134,11 @@ void DisconnectCallbacks( Ecore_IMF_Context *imfContext )
 void Show()
 {
   Dali::ImfManager imfManager = ImfManager::Get(); // Create ImfManager instance (if required) to show the keyboard
-  Ecore_IMF_Context* imfContext = NULL;
+  Ecore_IMF_Context* imfContext = reinterpret_cast<Ecore_IMF_Context*>( imfManager.GetContext() );
 
-  if( imfManager )
+  if( imfContext )
   {
-    imfContext = reinterpret_cast<Ecore_IMF_Context*>( imfManager.GetContext() );
-
-    if( imfContext )
-    {
-      ecore_imf_context_input_panel_show( imfContext );
-    }
+    ecore_imf_context_input_panel_show( imfContext );
   }
 }
 
@@ -210,16 +205,11 @@ void ApplySettings( const Property::Map& settingsMap )
 void EnablePrediction(const bool enable)
 {
   Dali::ImfManager imfManager = ImfManager::Get(); // Create ImfManager instance (if required) when enabling prediction
-  Ecore_IMF_Context* imfContext = NULL;
+  Ecore_IMF_Context* imfContext = reinterpret_cast<Ecore_IMF_Context*>( imfManager.GetContext() );
 
-  if( imfManager )
+  if ( imfContext )
   {
-    imfContext = reinterpret_cast<Ecore_IMF_Context*>( imfManager.GetContext() );
-
-    if ( imfContext )
-    {
-      ecore_imf_context_prediction_allow_set( imfContext, (enable)? EINA_TRUE : EINA_FALSE);
-    }
+    ecore_imf_context_prediction_allow_set( imfContext, (enable)? EINA_TRUE : EINA_FALSE);
   }
 }
 
@@ -249,21 +239,16 @@ Rect<int> GetSizeAndPosition()
 
   width = height = xPos = yPos = 0;
   Dali::ImfManager imfManager = ImfManager::Get(); // Create ImfManager instance (if required) as we may need to do some size related setup in the application
-  Ecore_IMF_Context* imfContext = NULL;
+  Ecore_IMF_Context* imfContext = reinterpret_cast<Ecore_IMF_Context*>( imfManager.GetContext() );
 
-  if( imfManager )
+  if( imfContext )
   {
-    imfContext = reinterpret_cast<Ecore_IMF_Context*>( imfManager.GetContext() );
-
-    if( imfContext )
-    {
-      ecore_imf_context_input_panel_geometry_get(imfContext, &xPos, &yPos, &width, &height);
-    }
-    else
-    {
-      DALI_LOG_WARNING("VKB Unable to get IMF Context so GetSize unavailable\n");
+    ecore_imf_context_input_panel_geometry_get(imfContext, &xPos, &yPos, &width, &height);
+  }
+  else
+  {
+    DALI_LOG_WARNING("VKB Unable to get IMF Context so GetSize unavailable\n");
     // return 0 as real size unknown.
-    }
   }
 
   return Rect<int>(xPos,yPos,width,height);