N_SE-38636 : proper exception code
[platform/framework/native/appfw.git] / src / app / FApp_AppResourceImpl.cpp
index 04e2e08..dcb5d99 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -95,7 +94,7 @@ _AppResourceImpl::GetInstanceN(AppResourceBy type, const Tizen::Base::String& va
        r = __pContainer->ContainsKey(value, hasAppResource);
        SysTryReturn(NID_APP, !IsFailed(r), null, r, "[%s] Checking to contain is failed.", GetErrorMessage(r));
 
-       if(hasAppResource == true)
+       if (hasAppResource)
        {
                return static_cast<AppResource*> (__pContainer->GetValue(value));
        }
@@ -241,5 +240,20 @@ _AppResourceImpl::Reinitialize(void)
        }
 }
 
+Bitmap*
+_AppResourceImpl::GetNonScalingBitmapN(const Tizen::Base::String& imagePath)
+{
+       _IAppResourceBitmap* pAppResourceBitmap = Tizen::App::_AppResourceImpl::Get_IAppResourceBitmapN(APP_RESOURCE_BITMAP);
+
+       if (pAppResourceBitmap != null)
+       {
+               return pAppResourceBitmap->GetBitmapN(imagePath, BITMAP_PIXEL_FORMAT_INVALID);
+       }
+       else
+       {
+               SysLog(NID_APP, "Getting pAppResourceBitmap instance is failed");
+               return null;
+       }
+}
 
 } } // Tizen::App