From 5fe5bf96b8b7686790cdc2741b1eb77727071635 Mon Sep 17 00:00:00 2001 From: Wonyoung Choi Date: Tue, 19 Sep 2017 11:41:06 +0900 Subject: [PATCH] [SystemInfo] Remove build warnings Suppress CS0618 warnings that is caused by obsolete of SystemInfo. Remove unnecessary EditorBrowable attributes because hiding APIs is needed for only public classes or methods. Change-Id: I11643b111800078362fd53ecf297c16b0ced7c8d --- src/Tizen.System.Information/Common/Information.cs | 7 ++----- src/Tizen.System.Information/Common/InformationErrorFactory.cs | 3 --- src/Tizen.System.Information/RuntimeInfo/Enumerations.cs | 3 --- src/Tizen.System.Information/RuntimeInfo/RuntimeInfo.cs | 3 --- .../RuntimeInfo/RuntimeInfoEventHandler.cs | 2 -- src/Tizen.System.Information/RuntimeInfo/TvProductHelper.cs | 4 ++-- 6 files changed, 4 insertions(+), 18 deletions(-) mode change 100755 => 100644 src/Tizen.System.Information/Common/Information.cs mode change 100755 => 100644 src/Tizen.System.Information/Common/InformationErrorFactory.cs mode change 100755 => 100644 src/Tizen.System.Information/RuntimeInfo/Enumerations.cs mode change 100755 => 100644 src/Tizen.System.Information/RuntimeInfo/RuntimeInfo.cs mode change 100755 => 100644 src/Tizen.System.Information/RuntimeInfo/RuntimeInfoEventHandler.cs mode change 100755 => 100644 src/Tizen.System.Information/RuntimeInfo/TvProductHelper.cs diff --git a/src/Tizen.System.Information/Common/Information.cs b/src/Tizen.System.Information/Common/Information.cs old mode 100755 new mode 100644 index 5ec9dc0..06ddf37 --- a/src/Tizen.System.Information/Common/Information.cs +++ b/src/Tizen.System.Information/Common/Information.cs @@ -16,8 +16,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.IO; namespace Tizen.System { @@ -81,7 +79,6 @@ namespace Tizen.System [RuntimeInfoKey.AudioJackConnector] = RuntimeInfoStringKeyAudioJackType }; - [EditorBrowsable(EditorBrowsableState.Never)] private static bool ConvertStringToRuntimeInfoKey(string key, out RuntimeInfoKey feature) { string filteredKey = key.StartsWith(HttpPrefix) ? key.Substring(HttpPrefix.Length) : key; @@ -90,7 +87,6 @@ namespace Tizen.System return StringEnumMapping.TryGetValue(filteredKey, out feature); } - [EditorBrowsable(EditorBrowsableState.Never)] private static bool TryGetRuntimeInfoValue(RuntimeInfoKey key, out T value) { value = default(T); @@ -104,7 +100,7 @@ namespace Tizen.System return RuntimeInfo.TryGetValue(key, out value); } - [EditorBrowsable(EditorBrowsableState.Never)] +#pragma warning disable CS0618 // Type or member is obsolete private static bool TryGetSystemInfoValue(string key, out T value) { value = default(T); @@ -123,6 +119,7 @@ namespace Tizen.System return SystemInfo.TryGetValue(key, out value); } +#pragma warning restore CS0618 // Type or member is obsolete /// /// Gets the value of the feature. diff --git a/src/Tizen.System.Information/Common/InformationErrorFactory.cs b/src/Tizen.System.Information/Common/InformationErrorFactory.cs old mode 100755 new mode 100644 index 906961d..e7ad717 --- a/src/Tizen.System.Information/Common/InformationErrorFactory.cs +++ b/src/Tizen.System.Information/Common/InformationErrorFactory.cs @@ -16,12 +16,10 @@ using System; using System.IO; -using System.ComponentModel; using Tizen.Internals.Errors; namespace Tizen.System { - [EditorBrowsable(EditorBrowsableState.Never)] internal enum InformationError { None = ErrorCode.None, @@ -34,7 +32,6 @@ namespace Tizen.System NoData = ErrorCode.NoData } - [EditorBrowsable(EditorBrowsableState.Never)] internal static class InformationErrorFactory { internal const string LogTag = "Tizen.System.Information"; diff --git a/src/Tizen.System.Information/RuntimeInfo/Enumerations.cs b/src/Tizen.System.Information/RuntimeInfo/Enumerations.cs old mode 100755 new mode 100644 index ea0281d..dfab9f1 --- a/src/Tizen.System.Information/RuntimeInfo/Enumerations.cs +++ b/src/Tizen.System.Information/RuntimeInfo/Enumerations.cs @@ -14,11 +14,8 @@ * limitations under the License. */ -using System.ComponentModel; - namespace Tizen.System { - [EditorBrowsable(EditorBrowsableState.Never)] /// /// Enumeration for the runtime information key. /// diff --git a/src/Tizen.System.Information/RuntimeInfo/RuntimeInfo.cs b/src/Tizen.System.Information/RuntimeInfo/RuntimeInfo.cs old mode 100755 new mode 100644 index 9ce011a..ba4a70a --- a/src/Tizen.System.Information/RuntimeInfo/RuntimeInfo.cs +++ b/src/Tizen.System.Information/RuntimeInfo/RuntimeInfo.cs @@ -16,12 +16,9 @@ using System; using System.Collections.Generic; -using System.IO; -using System.ComponentModel; namespace Tizen.System { - [EditorBrowsable(EditorBrowsableState.Never)] internal static class RuntimeInfo { private static RuntimeInfoEventHandler BluetoothEnabled = new RuntimeInfoEventHandler(RuntimeInfoKey.Bluetooth); diff --git a/src/Tizen.System.Information/RuntimeInfo/RuntimeInfoEventHandler.cs b/src/Tizen.System.Information/RuntimeInfo/RuntimeInfoEventHandler.cs old mode 100755 new mode 100644 index 733e0f1..973957d --- a/src/Tizen.System.Information/RuntimeInfo/RuntimeInfoEventHandler.cs +++ b/src/Tizen.System.Information/RuntimeInfo/RuntimeInfoEventHandler.cs @@ -15,11 +15,9 @@ */ using System; -using System.ComponentModel; namespace Tizen.System { - [EditorBrowsable(EditorBrowsableState.Never)] internal class RuntimeInfoEventHandler { private RuntimeInfoKey Key; diff --git a/src/Tizen.System.Information/RuntimeInfo/TvProductHelper.cs b/src/Tizen.System.Information/RuntimeInfo/TvProductHelper.cs old mode 100755 new mode 100644 index df9e3a2..ef5f846 --- a/src/Tizen.System.Information/RuntimeInfo/TvProductHelper.cs +++ b/src/Tizen.System.Information/RuntimeInfo/TvProductHelper.cs @@ -16,11 +16,9 @@ using System; using System.Collections.Generic; -using System.ComponentModel; namespace Tizen.System { - [EditorBrowsable(EditorBrowsableState.Never)] internal static class TvProductHelper { private static int is_TV_product = -1; @@ -52,7 +50,9 @@ namespace Tizen.System if (is_TV_product == -1) { +#pragma warning disable CS0618 // Type or member is obsolete is_key_existed = SystemInfo.TryGetValue("http://com.samsung/build_config/product_type", out profile); +#pragma warning restore CS0618 // Type or member is obsolete if (is_key_existed && String.Compare(profile, "TV") == 0) { is_TV_product = 1; -- 2.7.4