* [MediaContent] Added "content.scanning.others" feature tags to related methods. (#15)
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
* [MediaCodec] Added feature tags. (#14)
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
* [MediaContent] Added NotSupportedException to be thrown when the feature is not supported. (#18)
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
* [MediaPlayer] Added feature tag on the ApplyAudioStreamPolicy method. (#16)
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
* [NUI] Fix sibling issue (#20)
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] DALi version 1.2.80 (#21)
* [Tizen.NUI]Fix bug about Children property. (#23)
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [TtsEngine] Fix invalid marshalling (#25)
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
* Fixed issue where key event does not occur when focus is lost (#24)
* NUI release 1.2.81 (#27)
* [4.0] Fix auto tct widgetImpl dispose crash
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] DALi version 1.2.81
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [TtsEngine/SttEngine] Fix invalid marshalling (#29)
* [TtsEngine] Fix invalid marshalling
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
* [TtsEngine] Fix invalid marshalling
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
* [SttEngine] Fix invalid marshalling
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
* Restore converted key before calling a callback (#30)
* [MediaPlayer] Added ErrorHandler registration methods for internal use. (#31)
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
* [Recorder] Change recorder feature (#32)
* [SystemSettings] Changed event handler routine. (#22)
Signed-off-by: jinwang.an <jinwang.an@samsung.com>
* [ElmSharp] Changed Widget.SetFocus() internal routine (#35)
* [ElmSharp] Changed Widget.SetFocus() internal routine
* [ElmSharp] fix elm_object_focuse_clear() routine order
* [ElmSharp] elm_object_focus_clear() code clean up
* [NUI] Support for animated GIF (#34)
* [NUI] Added playback (i.e. Play, Pause, Stop) support for the animated GIF
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] Loop count support for animated GIF
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] Modify property index
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] Fix SiblingOrder return value (#37)
If parentChildren count is empty, return 0
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] Fix svace issue (#41)
* [NUI] Fix svace issue
Value widget, which was created by as-operator, so can be null,
is dereferenced in method call widget.GetIntPtr()
Value value, which is result of method invocation with possible null return value,
is dereferenced in method call value.Get()
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] Modify unassigned local variable 'str'
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* change a property to a method for exception handling (#46)
* [ElmSharp] Remove layout for Background (#28)
Signed-off-by: Jeonghyun Yun <jh0506.yun@samsung.com>
* [ElmSharp] fix svace issue (#42)
Add an optional extended description…
* [NUI] Nui release 1.2.82 (#45)
* [NUI] Added RefObjectPtr null check condition in Registry
copy from gerrit
: https://review.tizen.org/gerrit/#/c/167442/1
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] C# binding for VERTICAL_LINE_ALIGNMENT property
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] NUI release 1.2.82
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] Add SetProperty for VerticalLineAlignment (#48)
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [Device] add lock for global variable of led and battery (#49)
* [Information] Fix delegate lifetime issue (#52)
Signed-off-by: kichankwon <k_c.kwon@samsung.com>
* Fixed svace issue (#53)
* [Notification] Fix handle leak (#57)
* fix svace issues (#59)
* [Tts/Stt/VoiceControl] Fix indent and lock issue (#61)
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
* [Calendar] Fix svace issue (#62)
* [NUI] Add protected codes to avoid the crash when the IntPtr of key is 0 (#72)
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* [NUI]fix memory leak problem caused by wrong increased ref-cnt (#75)
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* [ElmSharp] Changed Background Color property internal implementation to Widget BackgroundColor property (#58)
Signed-off-by: Jeonghyun Yun <jh0506.yun@samsung.com>
* [NUI] Apply sibling patch (#74)
* Revert "[NUI] Fix SiblingOrder return value (#37)"
This reverts commit
6591fa264a9316785a0601f0b25f2fd1994dad22.
* Revert "[Tizen.NUI]Fix bug about Children property. (#23)"
This reverts commit
6d306df109b452d8f03bc28180b56bf38fd4ed2d.
* Revert "[NUI] Fix sibling issue (#20)"
This reverts commit
da9ec169dab93abd132247eaad37eaf559e99edf.
* [NUI] Fix sibling issue
This reverts commit
ee09d11559d07c19d379e5cd6f81b953c5b179ef.
* [Tizen.NUI]Fix bug about Children property.
This reverts commit
5c4ef3415bdef7ea5d6ae8ee4c07c330a2458b16.
* [NUI] Fix SiblingOrder return value
This reverts commit
28e5a6c00537b60b1bcb3b4f01d2ef9b2f08f10e.
* [NUI] NUI_1.2.83 version release (#77)
* [NUI] remove this.Reset in Animation Dispose
* [NUI] NUI_1.2.83 Version
* [NUI]Revert sibling patch (#78)
* Revert "[NUI] Fix SiblingOrder return value (#37)"
This reverts commit
6591fa264a9316785a0601f0b25f2fd1994dad22.
* Revert "[Tizen.NUI]Fix bug about Children property. (#23)"
This reverts commit
6d306df109b452d8f03bc28180b56bf38fd4ed2d.
* Revert "[NUI] Fix sibling issue (#20)"
This reverts commit
da9ec169dab93abd132247eaad37eaf559e99edf.
* [NUI] Apply sibling patch (#79)
* [NUI] Fix sibling issue
This reverts commit
c52e414d9473f1ec744bb30eeed0bed033eec2dc.
* [NUI]Fix bug about Children property.
This reverts commit
5f2fa0f0e7bc26eed46b38431f6b702cc396e52f.
* [NUI] Fix SiblingOrder return value
This reverts commit
83d9228a204bccef4f9cd7b8d5927c869d8e41b4.
* [TEEC] Guard session close in destructor, follow 'Dispose Pattern' (#88)
* [NUI] Add protected codes for SiblingOrder (#89)
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [Telephony] Fix call notification numbering (#91)
* [Multimedia] Fixed wrong implementation of MediaBufferBase. (#94)
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
* [NUI] Fix memory leak problem (#95)
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* Update README.md
* [VoiceControl/VoiceControlWidget] Fix invalid null checking (#96)
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
* [NUI] Fix Parent crash error (#97)
* [NUI] fix Parent property memory leak (#100)
* Update CODEOWNERS
* [NUI] memory leak issue, rollback changes except View and Layer (#104)
* Fix xml documentation issues (#105)
3 cases of invalid xml structure
<description> added to list items
2 cases of < character - replaced with <
* [NUI] IntPtr is not Null always, null should be IntPtr.Zero (#106)
* [NUI] NUI_1.2.84 version release (#107)
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] Fix TCT Crash issue, Parent crash (#108)
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [Multimedia] Restored the GetException internal api of Player. (#109)
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
* [Multimedia] Fixed wrong implementation of GetException of MediaPlayer. (#110)
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
* [NUI] Fix memory leak (#111)
* [NUI] Change Registry as concurrent collection for protection code (#113)
* [NUI] NUI_1.2.85 version release (#115)
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] Delete NUI Log (#116)
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* Update README.md
* [NUI] Check NUI internal API version, Remove tizenfx build dependency from dali (#117)
* [Build] Remove dali native version check from rpm spec (#118)
* fixed delegator reference holding issue (#122)
* [Multimedia] Modify MediaPlayer for product reuse (#124)
* Revert "[Telephony] Fix call notification numbering (#91)" (#125)
This reverts commit
613641d2906b3b9ca83e3e9abdedd4dee15e86a1.
* Update CODEOWNERS
* [Stt] Fix lock issue (#126)
Signed-off-by: sungrae jo <seongrae.jo@samsung.com>
* [Tizen.Network.WiFi] Use lock on checking if instance is null (#131)
* [WiFi][Connection] Apply CAPIs for thread handling (#134)
* [Tizen.Network.WiFi] Use lock on checking if instance is null
* [WiFi][Connection] Apply CAPIs for thread handling
* [Tizen.Applications.MessagePort] Remove checking name of remoteport (#135)
To get remote app id regardless of the remote-port name
* [Tizen.Applications.DataControl] Fixed a bug for checking if IntPtr is null (#137)
* [Notification] Save the hidetime, deletetime value (#140)
- regardless of IsAutoRemove
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
* [Connection][WiFi]Apply TizenSynchronizationContext for event handling (#138)
* [NUI] Fix parent get issue (#141)
Signed-off-by: huiyu <huiyu@huiyu-linux.tn.corp.samsungelectronics.net>
* [Connection][WiFi] Use TizenSynchronizationContext.Post for asynchronous methods (#147)
* [Tizen.Network.WiFi] Use lock on checking if instance is null
* [WiFi][Connection] Apply CAPIs for thread handling
* [Connection][WiFi] Use TizenSynchronizationContext.Post for asynchronous methods
* [Connection][WiFi] Use TizenSynchronizationContext.Post for asynchronous methods #2
Fixed build error
* [Connection][WiFi] Handling exception for event and async methods
using System.Collections.Generic;
using System.Linq;
using System.Text;
-using System.Threading;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using System.Collections;
+using System.Threading;
using Tizen.Applications;
namespace Tizen.Network.Connection
public HandleHolder()
{
_tid = Thread.CurrentThread.ManagedThreadId;
-
Log.Info(Globals.LogTag, "PInvoke connection_create for Thread " + _tid);
int ret = Interop.Connection.Create(_tid, out Handle);
Log.Info(Globals.LogTag, "Handle: " + Handle);
{
if (_ConnectionTypeChanged == null)
{
- ConnectionTypeChangedStart();
+ try
+ {
+ ConnectionTypeChangedStart();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding ConnectionTypeChanged\n" + e.ToString());
+ return;
+ }
}
_ConnectionTypeChanged += value;
}, null);
_ConnectionTypeChanged -= value;
if (_ConnectionTypeChanged == null)
{
- ConnectionTypeChangedStop();
+ try
+ {
+ ConnectionTypeChangedStop();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing ConnectionTypeChanged\n" + e.ToString());
+ }
}
}, null);
}
{
if (_EthernetCableStateChanged == null)
{
- EthernetCableStateChangedStart();
+ try
+ {
+ EthernetCableStateChangedStart();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding EthernetCableStateChanged\n" + e.ToString());
+ return;
+ }
}
_EthernetCableStateChanged += value;
}, null);
_EthernetCableStateChanged -= value;
if (_EthernetCableStateChanged == null)
{
- EthernetCableStateChangedStop();
+ try
+ {
+ EthernetCableStateChangedStop();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing EthernetCableStateChanged\n" + e.ToString());
+ }
}
}, null);
}
{
if (_IPAddressChanged == null)
{
- IPAddressChangedStart();
+ try
+ {
+ IPAddressChangedStart();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding IPAddressChanged\n" + e.ToString());
+ return;
+ }
}
_IPAddressChanged += value;
}, null);
_IPAddressChanged -= value;
if (_IPAddressChanged == null)
{
- IPAddressChangedStop();
+ try
+ {
+ IPAddressChangedStop();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing IPAddressChanged\n" + e.ToString());
+ }
}
}, null);
}
{
if (_ProxyAddressChanged == null)
{
- ProxyAddressChangedStart();
+ try
+ {
+ ProxyAddressChangedStart();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding ProxyAddressChanged\n" + e.ToString());
+ return;
+ }
}
_ProxyAddressChanged += value;
}, null);
_ProxyAddressChanged -= value;
if (_ProxyAddressChanged == null)
{
- ProxyAddressChangedStop();
+ try
+ {
+ ProxyAddressChangedStop();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing ProxyAddressChanged\n" + e.ToString());
+ }
}
}, null);
}
context.Post((x) =>
{
Log.Info(Globals.LogTag, "Interop.Connection.SetDefaultCellularServiceProfileAsync " + profile.Name);
- int ret = Interop.Connection.SetDefaultCellularServiceProfileAsync(GetHandle(), (int)type, profile.ProfileHandle, Callback, (IntPtr)0);
- if ((ConnectionError)ret != ConnectionError.None)
+ try
{
- Log.Error(Globals.LogTag, "It failed to set default cellular profile, " + (ConnectionError)ret);
- ConnectionErrorFactory.CheckFeatureUnsupportedException(ret, "http://tizen.org/feature/network.telephony");
- ConnectionErrorFactory.CheckHandleNullException(ret, (GetHandle() == IntPtr.Zero || profile.ProfileHandle == IntPtr.Zero), "Connection or Profile Handle may have been disposed or released");
- ConnectionErrorFactory.ThrowConnectionException(ret);
+ int ret = Interop.Connection.SetDefaultCellularServiceProfileAsync(GetHandle(), (int)type, profile.ProfileHandle, Callback, (IntPtr)0);
+
+ if ((ConnectionError)ret != ConnectionError.None)
+ {
+ Log.Error(Globals.LogTag, "It failed to set default cellular profile, " + (ConnectionError)ret);
+ ConnectionErrorFactory.CheckFeatureUnsupportedException(ret, "http://tizen.org/feature/network.telephony");
+ ConnectionErrorFactory.CheckHandleNullException(ret, (GetHandle() == IntPtr.Zero || profile.ProfileHandle == IntPtr.Zero), "Connection or Profile Handle may have been disposed or released");
+ ConnectionErrorFactory.ThrowConnectionException(ret);
+ }
+ } catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on SetDefaultCellularServiceProfileAsync\n" + e.ToString());
+ task.SetException(e);
}
}, null);
context.Post((x) =>
{
Log.Info(Globals.LogTag, "Interop.Connection.OpenProfile " + profile.Name);
- int ret = Interop.Connection.OpenProfile(GetHandle(), profile.ProfileHandle, Callback, IntPtr.Zero);
- if ((ConnectionError)ret != ConnectionError.None)
+ try
{
- Log.Error(Globals.LogTag, "It failed to connect profile, " + (ConnectionError)ret);
- ConnectionErrorFactory.CheckFeatureUnsupportedException(ret, "http://tizen.org/feature/network.telephony " + "http://tizen.org/feature/network.wifi " + "http://tizen.org/feature/network.tethering.bluetooth");
- ConnectionErrorFactory.CheckHandleNullException(ret, (GetHandle() == IntPtr.Zero || profile.ProfileHandle == IntPtr.Zero), "Connection or Profile Handle may have been disposed or released");
- ConnectionErrorFactory.ThrowConnectionException(ret);
+ int ret = Interop.Connection.OpenProfile(GetHandle(), profile.ProfileHandle, Callback, IntPtr.Zero);
+ if ((ConnectionError)ret != ConnectionError.None)
+ {
+ Log.Error(Globals.LogTag, "It failed to connect profile, " + (ConnectionError)ret);
+ ConnectionErrorFactory.CheckFeatureUnsupportedException(ret, "http://tizen.org/feature/network.telephony " + "http://tizen.org/feature/network.wifi " + "http://tizen.org/feature/network.tethering.bluetooth");
+ ConnectionErrorFactory.CheckHandleNullException(ret, (GetHandle() == IntPtr.Zero || profile.ProfileHandle == IntPtr.Zero), "Connection or Profile Handle may have been disposed or released");
+ ConnectionErrorFactory.ThrowConnectionException(ret);
+ }
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on OpenProfile\n" + e.ToString());
+ task.SetException(e);
}
}, null);
context.Post((x) =>
{
Log.Info(Globals.LogTag, "Interop.Connection.CloseProfile " + profile.Name);
- int ret = Interop.Connection.CloseProfile(GetHandle(), profile.ProfileHandle, Callback, IntPtr.Zero);
- if ((ConnectionError)ret != ConnectionError.None)
+ try
{
- Log.Error(Globals.LogTag, "It failed to disconnect profile, " + (ConnectionError)ret);
- ConnectionErrorFactory.CheckFeatureUnsupportedException(ret, "http://tizen.org/feature/network.telephony " + "http://tizen.org/feature/network.wifi " + "http://tizen.org/feature/network.tethering.bluetooth");
- ConnectionErrorFactory.CheckPermissionDeniedException(ret, "(http://tizen.org/privilege/network.set)");
- ConnectionErrorFactory.CheckHandleNullException(ret, (GetHandle() == IntPtr.Zero || profile.ProfileHandle == IntPtr.Zero), "Connection or Profile Handle may have been disposed or released");
- ConnectionErrorFactory.ThrowConnectionException(ret);
+ int ret = Interop.Connection.CloseProfile(GetHandle(), profile.ProfileHandle, Callback, IntPtr.Zero);
+ if ((ConnectionError)ret != ConnectionError.None)
+ {
+ Log.Error(Globals.LogTag, "It failed to disconnect profile, " + (ConnectionError)ret);
+ ConnectionErrorFactory.CheckFeatureUnsupportedException(ret, "http://tizen.org/feature/network.telephony " + "http://tizen.org/feature/network.wifi " + "http://tizen.org/feature/network.tethering.bluetooth");
+ ConnectionErrorFactory.CheckPermissionDeniedException(ret, "(http://tizen.org/privilege/network.set)");
+ ConnectionErrorFactory.CheckHandleNullException(ret, (GetHandle() == IntPtr.Zero || profile.ProfileHandle == IntPtr.Zero), "Connection or Profile Handle may have been disposed or released");
+ ConnectionErrorFactory.ThrowConnectionException(ret);
+ }
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on CloseProfile\n" + e.ToString());
+ task.SetException(e);
}
}, null);
if (_disposed)
return;
- if (disposing)
- {
- Interop.WiFi.AP.Destroy(_apHandle);
- _apHandle = IntPtr.Zero;
- }
+ Interop.WiFi.AP.Destroy(_apHandle);
+ _apHandle = IntPtr.Zero;
_disposed = true;
}
context.Post((x) =>
{
Log.Info(Globals.LogTag, "Interop.WiFi.Connect");
- int ret = Interop.WiFi.Connect(WiFiManagerImpl.Instance.GetSafeHandle(), _apHandle, _callback_map[id], id);
- if (ret != (int)WiFiError.None)
+ try
+ {
+ int ret = Interop.WiFi.Connect(WiFiManagerImpl.Instance.GetSafeHandle(), _apHandle, _callback_map[id], id);
+ if (ret != (int)WiFiError.None)
+ {
+ Log.Error(Globals.LogTag, "Failed to connect wifi, Error - " + (WiFiError)ret);
+ WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle(), _apHandle);
+ }
+ }
+ catch (Exception e)
{
- Log.Error(Globals.LogTag, "Failed to connect wifi, Error - " + (WiFiError)ret);
- WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle(), _apHandle);
+ Log.Error(Globals.LogTag, "Exception on ConnectAsync\n" + e.ToString());
+ task.SetException(e);
}
}, null);
context.Post((x) =>
{
- int ret = -1;
- if (info.GetType() == typeof(WpsPbcInfo))
+ try
{
- Log.Info(Globals.LogTag, "Interop.WiFi.ConnectByWpsPb");
- ret = Interop.WiFi.ConnectByWpsPbc(WiFiManagerImpl.Instance.GetSafeHandle(), _apHandle, _callback_map[id], id);
- }
- else if (info.GetType() == typeof(WpsPinInfo))
- {
- WpsPinInfo pinInfo = (WpsPinInfo)info;
- if (pinInfo.GetWpsPin() == null)
+ int ret = -1;
+ if (info.GetType() == typeof(WpsPbcInfo))
{
- throw new ArgumentNullException("Wps pin should not be null");
+ Log.Info(Globals.LogTag, "Interop.WiFi.ConnectByWpsPb");
+ ret = Interop.WiFi.ConnectByWpsPbc(WiFiManagerImpl.Instance.GetSafeHandle(), _apHandle, _callback_map[id], id);
}
-
- if (pinInfo.GetWpsPin().Length == 0 || pinInfo.GetWpsPin().Length > 8)
+ else if (info.GetType() == typeof(WpsPinInfo))
{
- throw new ArgumentOutOfRangeException("Wps pin should not be empty or more than 7 characters");
+ WpsPinInfo pinInfo = (WpsPinInfo)info;
+ if (pinInfo.GetWpsPin() == null)
+ {
+ throw new ArgumentNullException("Wps pin should not be null");
+ }
+
+ if (pinInfo.GetWpsPin().Length == 0 || pinInfo.GetWpsPin().Length > 8)
+ {
+ throw new ArgumentOutOfRangeException("Wps pin should not be empty or more than 7 characters");
+ }
+
+ Log.Info(Globals.LogTag, "Interop.WiFi.ConnectByWpsPin");
+ ret = Interop.WiFi.ConnectByWpsPin(WiFiManagerImpl.Instance.GetSafeHandle(), _apHandle, pinInfo.GetWpsPin(), _callback_map[id], id);
}
- Log.Info(Globals.LogTag, "Interop.WiFi.ConnectByWpsPin");
- ret = Interop.WiFi.ConnectByWpsPin(WiFiManagerImpl.Instance.GetSafeHandle(), _apHandle, pinInfo.GetWpsPin(), _callback_map[id], id);
+ if (ret != (int)WiFiError.None)
+ {
+ Log.Error(Globals.LogTag, "Failed to connect wifi, Error - " + (WiFiError)ret);
+ WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle(), _apHandle);
+ }
}
-
- if (ret != (int)WiFiError.None)
+ catch (Exception e)
{
- Log.Error(Globals.LogTag, "Failed to connect wifi, Error - " + (WiFiError)ret);
- WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle(), _apHandle);
+ Log.Error(Globals.LogTag, "Exception on ConnectWpsAsync\n" + e.ToString());
+ task.SetException(e);
}
}, null);
s_context.Post((x) =>
{
- int ret = -1;
- if (info.GetType() == typeof(WpsPbcInfo))
- {
- Log.Info(Globals.LogTag, "Interop.WiFi.ConnectByWpsPbcWithoutSsid");
- ret = Interop.WiFi.ConnectByWpsPbcWithoutSsid(WiFiManagerImpl.Instance.GetSafeHandle(), s_callbackMap[id], id);
- }
- else if (info.GetType() == typeof(WpsPinInfo))
+ try
{
- WpsPinInfo pinInfo = (WpsPinInfo)info;
- if (pinInfo.GetWpsPin() == null)
+ int ret = -1;
+ if (info.GetType() == typeof(WpsPbcInfo))
{
- throw new ArgumentNullException("Wps pin should not be null");
+ Log.Info(Globals.LogTag, "Interop.WiFi.ConnectByWpsPbcWithoutSsid");
+ ret = Interop.WiFi.ConnectByWpsPbcWithoutSsid(WiFiManagerImpl.Instance.GetSafeHandle(), s_callbackMap[id], id);
}
-
- if (pinInfo.GetWpsPin().Length != 4 && pinInfo.GetWpsPin().Length != 8)
+ else if (info.GetType() == typeof(WpsPinInfo))
{
- throw new ArgumentOutOfRangeException("Wps pin should be of 4 or 8 characters long");
+ WpsPinInfo pinInfo = (WpsPinInfo)info;
+ if (pinInfo.GetWpsPin() == null)
+ {
+ throw new ArgumentNullException("Wps pin should not be null");
+ }
+
+ if (pinInfo.GetWpsPin().Length != 4 && pinInfo.GetWpsPin().Length != 8)
+ {
+ throw new ArgumentOutOfRangeException("Wps pin should be of 4 or 8 characters long");
+ }
+
+ Log.Info(Globals.LogTag, "Interop.WiFi.ConnectByWpsPinWithoutSsid");
+ ret = Interop.WiFi.ConnectByWpsPinWithoutSsid(WiFiManagerImpl.Instance.GetSafeHandle(), pinInfo.GetWpsPin(), s_callbackMap[id], id);
}
- Log.Info(Globals.LogTag, "Interop.WiFi.ConnectByWpsPinWithoutSsid");
- ret = Interop.WiFi.ConnectByWpsPinWithoutSsid(WiFiManagerImpl.Instance.GetSafeHandle(), pinInfo.GetWpsPin(), s_callbackMap[id], id);
+ if (ret != (int)WiFiError.None)
+ {
+ Log.Error(Globals.LogTag, "Failed to connect wifi, Error - " + (WiFiError)ret);
+ WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle());
+ }
}
-
- if (ret != (int)WiFiError.None)
+ catch (Exception e)
{
- Log.Error(Globals.LogTag, "Failed to connect wifi, Error - " + (WiFiError)ret);
- WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle());
+ Log.Error(Globals.LogTag, "Exception on ConnectWpsWithoutSsidAsync\n" + e.ToString());
+ task.SetException(e);
}
}, null);
context.Post((x) =>
{
Log.Info(Globals.LogTag, "Interop.WiFi.Disconnect");
- int ret = Interop.WiFi.Disconnect(WiFiManagerImpl.Instance.GetSafeHandle(), _apHandle, _callback_map[id], id);
- if (ret != (int)WiFiError.None)
+ try
+ {
+ int ret = Interop.WiFi.Disconnect(WiFiManagerImpl.Instance.GetSafeHandle(), _apHandle, _callback_map[id], id);
+ if (ret != (int)WiFiError.None)
+ {
+ Log.Error(Globals.LogTag, "Failed to disconnect wifi, Error - " + (WiFiError)ret);
+ WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle(), _apHandle);
+ }
+ }
+ catch (Exception e)
{
- Log.Error(Globals.LogTag, "Failed to disconnect wifi, Error - " + (WiFiError)ret);
- WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle(), _apHandle);
+ Log.Error(Globals.LogTag, "Exception on Disconnect\n" + e.ToString());
+ task.SetException(e);
}
}, null);
if (_disposed)
return;
- if (disposing)
- {
- Interop.WiFi.Config.Destroy(_configHandle);
- _configHandle = IntPtr.Zero;
- }
+ Interop.WiFi.Config.Destroy(_configHandle);
+ _configHandle = IntPtr.Zero;
_disposed = true;
}
context.Post((x) =>
{
Log.Info(Globals.LogTag, "Interop.WiFi.ActivateAsync");
- int ret = Interop.WiFi.Activate(GetSafeHandle(), _callback_map[id], id);
- if (ret != (int)WiFiError.None)
+ try
+ {
+ int ret = Interop.WiFi.Activate(GetSafeHandle(), _callback_map[id], id);
+ if (ret != (int)WiFiError.None)
+ {
+ Log.Error(Globals.LogTag, "Failed to activate wifi, Error - " + (WiFiError)ret);
+ WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle());
+ }
+ }
+ catch (Exception e)
{
- Log.Error(Globals.LogTag, "Failed to activate wifi, Error - " + (WiFiError)ret);
- WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle());
+ Log.Error(Globals.LogTag, "Exception on ActivateAsync\n" + e.ToString());
+ task.SetException(e);
}
}, null);
context.Post((x) =>
{
Log.Info(Globals.LogTag, "Interop.WiFi.ActivateWithWiFiPickerTestedAsync");
- int ret = Interop.WiFi.ActivateWithWiFiPickerTested(GetSafeHandle(), _callback_map[id], id);
- if (ret != (int)WiFiError.None)
+ try
{
- Log.Error(Globals.LogTag, "Failed to activate wifi, Error - " + (WiFiError)ret);
- WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle());
+ int ret = Interop.WiFi.ActivateWithWiFiPickerTested(GetSafeHandle(), _callback_map[id], id);
+ if (ret != (int)WiFiError.None)
+ {
+ Log.Error(Globals.LogTag, "Failed to activate wifi, Error - " + (WiFiError)ret);
+ WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle());
+ }
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on ActivateWithWiFiPickerTestedAsync\n" + e.ToString());
+ task.SetException(e);
}
}, null);
context.Post((x) =>
{
Log.Info(Globals.LogTag, "Interop.WiFi.Deactivate");
- int ret = Interop.WiFi.Deactivate(GetSafeHandle(), _callback_map[id], id);
- if (ret != (int)WiFiError.None)
+ try
+ {
+ int ret = Interop.WiFi.Deactivate(GetSafeHandle(), _callback_map[id], id);
+ if (ret != (int)WiFiError.None)
+ {
+ Log.Error(Globals.LogTag, "Failed to deactivate wifi, Error - " + (WiFiError)ret);
+ WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle());
+ }
+ }
+ catch (Exception e)
{
- Log.Error(Globals.LogTag, "Failed to deactivate wifi, Error - " + (WiFiError)ret);
- WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle());
+ Log.Error(Globals.LogTag, "Exception on Deactivate\n" + e.ToString());
+ task.SetException(e);
}
}, null);
context.Post((x) =>
{
Log.Info(Globals.LogTag, "Interop.WiFi.Scan");
- int ret = Interop.WiFi.Scan(GetSafeHandle(), _callback_map[id], id);
- if (ret != (int)WiFiError.None)
+ try
{
- Log.Error(Globals.LogTag, "Failed to scan all AP, Error - " + (WiFiError)ret);
- WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle());
+ int ret = Interop.WiFi.Scan(GetSafeHandle(), _callback_map[id], id);
+ if (ret != (int)WiFiError.None)
+ {
+ Log.Error(Globals.LogTag, "Failed to scan all AP, Error - " + (WiFiError)ret);
+ WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle());
+ }
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on Scan\n" + e.ToString());
+ task.SetException(e);
}
}, null);
context.Post((x) =>
{
Log.Info(Globals.LogTag, "Interop.WiFi.ScanSpecificAPAsync");
- int ret = Interop.WiFi.ScanSpecificAP(GetSafeHandle(), essid, _callback_map[id], id);
- if (ret != (int)WiFiError.None)
+ try
+ {
+ int ret = Interop.WiFi.ScanSpecificAP(GetSafeHandle(), essid, _callback_map[id], id);
+ if (ret != (int)WiFiError.None)
+ {
+ Log.Error(Globals.LogTag, "Failed to scan with specific AP, Error - " + (WiFiError)ret);
+ WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle());
+ }
+ }
+ catch (Exception e)
{
- Log.Error(Globals.LogTag, "Failed to scan with specific AP, Error - " + (WiFiError)ret);
- WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle());
+ Log.Error(Globals.LogTag, "Exception on ScanSpecificAPAsync\n" + e.ToString());
+ task.SetException(e);
}
}, null);
{
if (_deviceStateChanged == null)
{
- RegisterDeviceStateChangedEvent();
+ try
+ {
+ RegisterDeviceStateChangedEvent();
+ } catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding DeviceStateChanged\n" + e.ToString());
+ return;
+ }
}
_deviceStateChanged += value;
}, null);
_deviceStateChanged -= value;
if (_deviceStateChanged == null)
{
- UnregisterDeviceStateChangedEvent();
+ try
+ {
+ UnregisterDeviceStateChangedEvent();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing DeviceStateChanged\n" + e.ToString());
+ }
}
}, null);
}
{
if (_connectionStateChanged == null)
{
- RegisterConnectionStateChangedEvent();
+ try
+ {
+ RegisterConnectionStateChangedEvent();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding ConnectionStateChanged\n" + e.ToString());
+ return;
+ }
}
_connectionStateChanged += value;
}, null);
_connectionStateChanged -= value;
if (_connectionStateChanged == null)
{
- UnregisterConnectionStateChangedEvent();
+ try
+ {
+ UnregisterConnectionStateChangedEvent();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing ConnectionStateChanged\n" + e.ToString());
+ }
}
}, null);
}
{
if (_rssiLevelChanged == null)
{
- RegisterRssiLevelChangedEvent();
+ try
+ {
+ RegisterRssiLevelChangedEvent();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding RssiLevelChanged\n" + e.ToString());
+ return;
+ }
}
_rssiLevelChanged += value;
}, null);
_rssiLevelChanged -= value;
if (_rssiLevelChanged == null)
{
- UnregisterRssiLevelChangedEvent();
+ try
+ {
+ UnregisterRssiLevelChangedEvent();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing RssiLevelChanged\n" + e.ToString());
+ }
}
}, null);
}
{
if (_backgroundScanFinished == null)
{
- RegisterBackgroundScanFinishedEvent();
+ try
+ {
+ RegisterBackgroundScanFinishedEvent();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on adding BackgroundScanFinished\n" + e.ToString());
+ return;
+ }
}
_backgroundScanFinished += value;
}, null);
_backgroundScanFinished -= value;
if (_backgroundScanFinished == null)
{
- UnregisterBackgroundScanFinishedEvent();
+ try
+ {
+ UnregisterBackgroundScanFinishedEvent();
+ }
+ catch (Exception e)
+ {
+ Log.Error(Globals.LogTag, "Exception on removing BackgroundScanFinished\n" + e.ToString());
+ }
}
}, null);
}