Handle exception in case of error in stopping bluetooth discovery 59/295759/2 accepted/tizen/unified/20230718.162148
authorAnuj Kumar Singh <anujk.singh@samsung.com>
Thu, 13 Jul 2023 08:27:05 +0000 (13:57 +0530)
committerAnuj Kumar Singh <anujk.singh@samsung.com>
Fri, 14 Jul 2023 04:51:13 +0000 (10:21 +0530)
Change-Id: I5426479f3426c731cf7f94637807a5bab05db691
Signed-off-by: Anuj Kumar Singh <anujk.singh@samsung.com>
SettingBluetooth/SettingBluetooth/SettingBluetooth.cs
packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk

index 82364695dabb6bf59049753c9dd060f8d62a8104..54cca7f392f92e4970d53e7a4116889c6583a3e0 100644 (file)
@@ -65,9 +65,16 @@ namespace SettingBluetooth
         protected override void OnDestroy()
         {
             Log.Info(LogTag, "OnDestroy");
-            if (BtModel.IsScanning)
+            try
             {
-                BtModel.StopDiscovery();
+                if (BtModel.IsScanning)
+                {
+                    BtModel.StopDiscovery();
+                }
+            }
+            catch (Exception e)
+            {
+                Log.Error(SettingBluetooth.LogTag, "StopDiscovery failed: " + e.ToString());
             }
             base.OnDestroy();
         }
index dad83b6762c230a3debcd1f5db61a6d20a8e9b78..0a35e66f38d7ae1f90d42c24398b1c8b4ce3ba90 100644 (file)
Binary files a/packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk and b/packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk differ