Merge remote-tracking branch 'origin/master' into tizen
authorTizenAPI-Bot <tizenapi@samsung.com>
Tue, 1 Aug 2023 15:09:51 +0000 (15:09 +0000)
committerTizenAPI-Bot <tizenapi@samsung.com>
Tue, 1 Aug 2023 15:09:51 +0000 (15:09 +0000)
src/Tizen.Log/Tizen/Log.cs
src/Tizen.System/Device/Battery.cs

index 74888fe..1e1c645 100755 (executable)
@@ -30,6 +30,15 @@ namespace Tizen
 
         private static unsafe void _Print(Interop.Dlog.LogID log_id, Interop.Dlog.LogPriority priority, string tag, string message, string file, string func, int line)
         {
+            if (tag == null)
+                tag = String.Empty;
+            if (message == null)
+                message = String.Empty;
+            if (file == null)
+                file = String.Empty;
+            if (func == null)
+                func = String.Empty;
+
             int tagByteLength = Encoding.UTF8.GetMaxByteCount(tag.Length);
             Span<byte> tagByte = tagByteLength < 1024 ? stackalloc byte[tagByteLength + 1] : new byte[tagByteLength + 1];
 
index 8f05d34..79627db 100755 (executable)
@@ -317,6 +317,8 @@ namespace Tizen.System
                     };
                     Interop.Device.DeviceAddCallback(eventType, s_chargingHandler, IntPtr.Zero);
                     break;
+                default:
+                    break;
             }
         }
 
@@ -335,6 +337,8 @@ namespace Tizen.System
                 case EventType.BatteryCharging:
                     Interop.Device.DeviceRemoveCallback(eventType, s_chargingHandler);
                     break;
+                default:
+                    break;
             }
         }
     }