From: CORP\mobaswirul.i Date: Thu, 3 Oct 2024 09:15:33 +0000 (+0600) Subject: Fix defects detected by static analysis tool X-Git-Tag: accepted/tizen/unified/20241006.053311~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=273775bafd469248e596a2f0e914458ee77d33f3;p=profile%2Fiot%2Fapps%2Fdotnet%2Fsettings.git Fix defects detected by static analysis tool [Problem] Issues detected by Static Analysis Tool [Cause & Measure] Cause : TabButton cannot be disposed properly Measure : Used inline style instead Change-Id: Ideaeab035803a61dca43f363fee20184b917830a Signed-off-by: CORP\mobaswirul.i --- diff --git a/SettingMainGadget/SettingMainGadget/About/AboutUserCertificatesGadget.cs b/SettingMainGadget/SettingMainGadget/About/AboutUserCertificatesGadget.cs index 8555290..bff070e 100644 --- a/SettingMainGadget/SettingMainGadget/About/AboutUserCertificatesGadget.cs +++ b/SettingMainGadget/SettingMainGadget/About/AboutUserCertificatesGadget.cs @@ -21,7 +21,6 @@ namespace Setting.Menu.About private ScrollableBase vpnTabContent, wifiTabContent, emailTabContent; private MoreMenuItem installMenuItem, uninstallMenuItem; - private TabButtonStyle tabButtonStyle; public override string ProvideTitle() => "User certificates"; public override IEnumerable ProvideMoreMenu() => Moremenu(); @@ -83,31 +82,30 @@ namespace Setting.Menu.About HeightSpecification = LayoutParamPolicies.MatchParent, }; - tabButtonStyle = ThemeManager.GetStyle("Tizen.NUI.Components.TabButton") as TabButtonStyle; - tabButtonStyle.Padding = new Extents(2, 2, 16, 16).SpToPx(); - tabButtonStyle.Icon.Size = new Size(2, -1).SpToPx(); - // VPN tab - var vpnTabButton = new TabButton(tabButtonStyle) + var vpnTabButton = new TabButton("Tizen.NUI.Components.TabButton") { // TODO: Add string resouce Text = "VPN", + Padding = new Extents(2, 2, 16, 16).SpToPx() }; vpnTabContent = TabView(); // Wi-Fi tab - var wifiTabButton = new TabButton(tabButtonStyle) + var wifiTabButton = new TabButton("Tizen.NUI.Components.TabButton") { // TODO: Add string resouce Text = "Wi-Fi", + Padding = new Extents(2, 2, 16, 16).SpToPx() }; wifiTabContent = TabView(); // Email tab - var emailTabButton = new TabButton(tabButtonStyle) + var emailTabButton = new TabButton("Tizen.NUI.Components.TabButton") { // TODO: Add string resouce Text = "Email", + Padding = new Extents(2, 2, 16, 16).SpToPx() }; emailTabContent = TabView(); @@ -231,7 +229,6 @@ namespace Setting.Menu.About Logger.Debug("OnDestroy()"); base.OnDestroy(); - tabButtonStyle.Dispose(); } } } diff --git a/packaging/org.tizen.settings.main-1.2.4.rpk b/packaging/org.tizen.settings.main-1.2.4.rpk index 574cfbf..3ffbf8a 100644 Binary files a/packaging/org.tizen.settings.main-1.2.4.rpk and b/packaging/org.tizen.settings.main-1.2.4.rpk differ