[NUI] Catch DllNotFoundException in IsSupportedMultiWindow() for desktop
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Fri, 28 Jan 2022 04:49:28 +0000 (13:49 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 8 Feb 2022 04:41:28 +0000 (13:41 +0900)
To support multi-window, creating a new Window calls
Window.IsSupportedMultiWindow().

Since libcapi-system-info.so.0 is not installed by default on desktop
environment, calling Window.IsSupportedMultiWindow() causes crash by
DllNotFoundException.

Not to cause crash by calling Window.IsSupportedMultiWindow() on
desktop, DllNotFoundException is caught.

src/Tizen.NUI/src/public/Window/Window.cs

index 18ad468..2640c31 100644 (file)
@@ -43,7 +43,14 @@ namespace Tizen.NUI
         static internal bool IsSupportedMultiWindow()
         {
             bool isSupported = false;
-            Information.TryGetValue("http://tizen.org/feature/opengles.surfaceless_context", out isSupported);
+            try
+            {
+                Information.TryGetValue("http://tizen.org/feature/opengles.surfaceless_context", out isSupported);
+            }
+            catch (DllNotFoundException e)
+            {
+                Tizen.Log.Fatal("NUI", $"{e}\n");
+            }
             return isSupported;
         }