From 003e39eee1a629ba007fc27c1810ad9070b0ea3c Mon Sep 17 00:00:00 2001 From: "pr.jung" Date: Mon, 7 Nov 2016 14:22:02 +0900 Subject: [PATCH] [RuntimeInformation]Remove Usb enumeration and callback Change-Id: I9f78a62d48ec85149e10bde3112e859585283fd8 Signed-off-by: pr.jung --- Tizen.System/RuntimeInfo/Enumerations.cs | 4 --- Tizen.System/RuntimeInfo/RuntimeInformation.cs | 39 -------------------------- packaging/csapi-system.spec | 2 +- 3 files changed, 1 insertion(+), 44 deletions(-) diff --git a/Tizen.System/RuntimeInfo/Enumerations.cs b/Tizen.System/RuntimeInfo/Enumerations.cs index 1e96bc5..b998d3b 100644 --- a/Tizen.System/RuntimeInfo/Enumerations.cs +++ b/Tizen.System/RuntimeInfo/Enumerations.cs @@ -83,10 +83,6 @@ namespace Tizen.System /// AudioJackConnector = 21, /// - /// Indicates whether USB is connected. - /// - Usb = 23, - /// /// Indicates whether charger is connected. /// Charger = 24, diff --git a/Tizen.System/RuntimeInfo/RuntimeInformation.cs b/Tizen.System/RuntimeInfo/RuntimeInformation.cs index 83334f7..b8b0c7c 100644 --- a/Tizen.System/RuntimeInfo/RuntimeInformation.cs +++ b/Tizen.System/RuntimeInfo/RuntimeInformation.cs @@ -41,7 +41,6 @@ namespace Tizen.System private static event EventHandler s_batteryIsCharging; private static event EventHandler s_tvOutConnected; private static event EventHandler s_audioJackConnectorChanged; - private static event EventHandler s_usbConnected; private static event EventHandler s_chargerConnected; private static event EventHandler 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 } } /// - /// (event) UsbConnected is raised when USB is connected/disconnected. - /// - public static event EventHandler 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); - } - } - } - } - /// /// (event) ChargerConnected is raised when charger is connected/disconnected. /// public static event EventHandler ChargerConnected diff --git a/packaging/csapi-system.spec b/packaging/csapi-system.spec index 75c2234..3c5bb41 100644 --- a/packaging/csapi-system.spec +++ b/packaging/csapi-system.spec @@ -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 -- 2.7.4