From 5ec3eca0f264f90a01d0fbcd9fd3ecd4f1e401e0 Mon Sep 17 00:00:00 2001 From: Akash Kumar Date: Fri, 22 Sep 2023 15:44:14 +0530 Subject: Resolve wrong wifi and info icon issue This patch: - resolves https://code.sec.samsung.net/jira/browse/TEIGHT-5155 - Updates rpk version from 1.1.4 to 1.1.5 Change-Id: Ie708a61bacae685e10533c5071d53b1f4235d1b4 Signed-off-by: Akash Kumar --- SettingWiFi/SettingWiFi/model/AP.cs | 28 +++++++++++++++------ .../SettingWiFi/images/wifi-ap_lock_icon.png | Bin 0 -> 590 bytes SettingWiFi/SettingWiFi/tizen-manifest.xml | 2 +- SettingWiFi/SettingWiFi/view/MainPage.cs | 24 +++++++++++++++--- packaging/org.tizen.cssetting-wifi-1.1.4.rpk | Bin 223294 -> 0 bytes packaging/org.tizen.cssetting-wifi-1.1.5.rpk | Bin 0 -> 221940 bytes packaging/org.tizen.setting-wifi.spec | 2 +- 7 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 SettingWiFi/SettingWiFi/res/allowed/SettingWiFi/images/wifi-ap_lock_icon.png delete mode 100644 packaging/org.tizen.cssetting-wifi-1.1.4.rpk create mode 100644 packaging/org.tizen.cssetting-wifi-1.1.5.rpk diff --git a/SettingWiFi/SettingWiFi/model/AP.cs b/SettingWiFi/SettingWiFi/model/AP.cs index cc92363..5a6b954 100755 --- a/SettingWiFi/SettingWiFi/model/AP.cs +++ b/SettingWiFi/SettingWiFi/model/AP.cs @@ -24,6 +24,7 @@ namespace SettingWiFi UNKNOWN, } string iconDir; + string infoIconDir; private string essid; private WiFiState state; private string stateInfo; @@ -62,11 +63,6 @@ namespace SettingWiFi { string iconName = "wifi-ap_icon_"; - if (secType != WiFiSecurityType.None) - { - iconName += "lock_"; - } - switch (signalStrength) { case SignalStrengthIndicator.EXCELLENT: @@ -87,9 +83,17 @@ namespace SettingWiFi iconName += ".png"; iconDir = Resources.GetPath() + "/images/" + iconName; + } - Debug("Signal: " + signalStrength.ToString() - + ", IconDir: " + iconDir); // TODO: will be removed. + + private void UpdateWiFiAPInfoIcon() + { + + if (secType != WiFiSecurityType.None) + { + string iconName = "wifi-ap_lock_icon.png"; + infoIconDir = Resources.GetPath() + "/images/" + iconName; + } } public AP() @@ -103,6 +107,7 @@ namespace SettingWiFi StateInfo = GetStateInfo(state); signalStrength = SignalStrengthIndicator.UNKNOWN; UpdateWiFiAPIcon(); + UpdateWiFiAPInfoIcon(); } public AP(WiFiAP apHandle, string apEssid, WiFiState apState, @@ -118,6 +123,7 @@ namespace SettingWiFi StateInfo = GetStateInfo(state); signalStrength = ConvertToSignalStrength(apRssiLevel); UpdateWiFiAPIcon(); + UpdateWiFiAPInfoIcon(); } public WiFiAP ApHandle @@ -209,6 +215,14 @@ namespace SettingWiFi } } + public string InfoImageUrl + { + get + { + return infoIconDir; + } + } + public string StateInfo { get diff --git a/SettingWiFi/SettingWiFi/res/allowed/SettingWiFi/images/wifi-ap_lock_icon.png b/SettingWiFi/SettingWiFi/res/allowed/SettingWiFi/images/wifi-ap_lock_icon.png new file mode 100644 index 0000000..973f41e Binary files /dev/null and b/SettingWiFi/SettingWiFi/res/allowed/SettingWiFi/images/wifi-ap_lock_icon.png differ diff --git a/SettingWiFi/SettingWiFi/tizen-manifest.xml b/SettingWiFi/SettingWiFi/tizen-manifest.xml index 6943aa0..d44e73a 100755 --- a/SettingWiFi/SettingWiFi/tizen-manifest.xml +++ b/SettingWiFi/SettingWiFi/tizen-manifest.xml @@ -1,6 +1,6 @@  diff --git a/SettingWiFi/SettingWiFi/view/MainPage.cs b/SettingWiFi/SettingWiFi/view/MainPage.cs index ee8a5b9..1b59dad 100755 --- a/SettingWiFi/SettingWiFi/view/MainPage.cs +++ b/SettingWiFi/SettingWiFi/view/MainPage.cs @@ -239,9 +239,28 @@ namespace SettingWiFi return icon; } + private View GetExtraInfoView() + { + View infoView = new View() + { + Layout = new LinearLayout() + { + LinearOrientation = LinearLayout.Orientation.Horizontal, + }, + }; + + ImageView icon = new ImageView(); + icon.SetBinding(ImageView.ResourceUrlProperty, "InfoImageUrl"); + icon.WidthSpecification = 32; + icon.HeightSpecification = 32; + infoView.Add(icon); + infoView.Add(GetInfoButton()); + return infoView; + } + private Button GetInfoButton() { - int buttonSize = 25; + int buttonSize = 32; ButtonStyle style = new ButtonStyle() { @@ -279,9 +298,8 @@ namespace SettingWiFi item.SubLabel.HorizontalAlignment = HorizontalAlignment.Begin; item.Icon = GetApIconImageView(); - item.Extra = GetInfoButton(); + item.Extra = GetExtraInfoView(); item.IsSelectable = false; - //OnAppClicked not working as expected as of now. Need to popup contentpage when clicked item.Clicked += OnAPClicked; return item; }); diff --git a/packaging/org.tizen.cssetting-wifi-1.1.4.rpk b/packaging/org.tizen.cssetting-wifi-1.1.4.rpk deleted file mode 100644 index af529c6..0000000 Binary files a/packaging/org.tizen.cssetting-wifi-1.1.4.rpk and /dev/null differ diff --git a/packaging/org.tizen.cssetting-wifi-1.1.5.rpk b/packaging/org.tizen.cssetting-wifi-1.1.5.rpk new file mode 100644 index 0000000..c6693a1 Binary files /dev/null and b/packaging/org.tizen.cssetting-wifi-1.1.5.rpk differ diff --git a/packaging/org.tizen.setting-wifi.spec b/packaging/org.tizen.setting-wifi.spec index b90c9d6..d371963 100644 --- a/packaging/org.tizen.setting-wifi.spec +++ b/packaging/org.tizen.setting-wifi.spec @@ -1,6 +1,6 @@ Name: org.tizen.setting-wifi summary: NUI wifi setting application -Version: 1.1.4 +Version: 1.1.5 Release: 1 Provides: org.tizen.setting-wifi = %{version}-%{release} Group: Applications/Security -- cgit v1.2.3