[RuntimeInformation]Remove Usb enumeration and callback
authorpr.jung <pr.jung@samsung.com>
Mon, 7 Nov 2016 05:22:02 +0000 (14:22 +0900)
committerpr.jung <pr.jung@samsung.com>
Mon, 7 Nov 2016 05:22:02 +0000 (14:22 +0900)
Change-Id: I9f78a62d48ec85149e10bde3112e859585283fd8
Signed-off-by: pr.jung <pr.jung@samsung.com>
Tizen.System/RuntimeInfo/Enumerations.cs
Tizen.System/RuntimeInfo/RuntimeInformation.cs
packaging/csapi-system.spec

index 1e96bc5..b998d3b 100644 (file)
@@ -83,10 +83,6 @@ namespace Tizen.System
         /// </summary>
         AudioJackConnector = 21,
         /// <summary>
-        /// Indicates whether USB is connected.
-        /// </summary>
-        Usb = 23,
-        /// <summary>
         /// Indicates whether charger is connected.
         /// </summary>
         Charger = 24,
index 83334f7..b8b0c7c 100644 (file)
@@ -41,7 +41,6 @@ namespace Tizen.System
         private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_batteryIsCharging;
         private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_tvOutConnected;
         private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_audioJackConnectorChanged;
-        private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_usbConnected;
         private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_chargerConnected;
         private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_autoRotationEnabled;
 
@@ -123,11 +122,6 @@ namespace Tizen.System
                         s_audioJackConnectorChanged?.Invoke(null, eventArgs);
                         break;
                     };
-                case RuntimeInformationKey.Usb:
-                    {
-                        s_usbConnected?.Invoke(null, eventArgs);
-                        break;
-                    };
                 case RuntimeInformationKey.Charger:
                     {
                         s_chargerConnected?.Invoke(null, eventArgs);
@@ -157,7 +151,6 @@ namespace Tizen.System
             [RuntimeInformationKey.AudioJack] = typeof(bool),
             [RuntimeInformationKey.BatteryIsCharging] = typeof(bool),
             [RuntimeInformationKey.TvOut] = typeof(bool),
-            [RuntimeInformationKey.Usb] = typeof(bool),
             [RuntimeInformationKey.Charger] = typeof(bool),
             [RuntimeInformationKey.AutoRotation] = typeof(bool),
             [RuntimeInformationKey.Gps] = typeof(int),
@@ -818,38 +811,6 @@ namespace Tizen.System
             }
         }
         /// <summary>
-        /// (event) UsbConnected is raised when USB is connected/disconnected.
-        /// </summary>
-        public static event EventHandler<RuntimeKeyStatusChangedEventArgs> UsbConnected
-        {
-            add
-            {
-                if (s_usbConnected == null)
-                {
-                    int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.Usb, s_runtimeInfoChangedCallback, IntPtr.Zero);
-                    if (ret != (int)RuntimeInfoError.None)
-                    {
-                        Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
-                        RuntimeInfoErrorFactory.ThrowException(ret);
-                    }
-                }
-                s_usbConnected += value;
-            }
-            remove
-            {
-                s_usbConnected -= value;
-                if (s_usbConnected == null)
-                {
-                    int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.Usb);
-                    if (ret != (int)RuntimeInfoError.None)
-                    {
-                        Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
-                        RuntimeInfoErrorFactory.ThrowException(ret);
-                    }
-                }
-            }
-        }
-        /// <summary>
         /// (event) ChargerConnected is raised when charger is connected/disconnected.
         /// </summary>
         public static event EventHandler<RuntimeKeyStatusChangedEventArgs> ChargerConnected
index 75c2234..3c5bb41 100644 (file)
@@ -8,7 +8,7 @@
 
 Name:       csapi-system
 Summary:    Tizen System API for C#
-Version:    1.0.3
+Version:    1.0.4
 Release:    1
 Group:      Development/Libraries
 License:    Apache-2.0