diff options
author | tarun.mahay <tarun.mahay@samsung.com> | 2022-10-13 14:26:04 +0530 |
---|---|---|
committer | tarun.mahay <tarun.mahay@samsung.com> | 2022-10-13 14:26:04 +0530 |
commit | 85ef2fcacb422f19b78ce55be5581c9530ee527d (patch) | |
tree | cfef47f94c443e303bdb394e35a404026bb18dc2 | |
parent | 3e829d2a81da7579868aa5e19172607515468ccd (diff) | |
download | tray-85ef2fcacb422f19b78ce55be5581c9530ee527d.tar.gz tray-85ef2fcacb422f19b78ce55be5581c9530ee527d.tar.bz2 tray-85ef2fcacb422f19b78ce55be5581c9530ee527d.zip |
Handling launch rejected exception.tizen_7.0_m2_releaseaccepted/tizen/unified/20221013.174607accepted/tizen/7.0/unified/hotfix/20221116.111709accepted/tizen/7.0/unified/20221110.060212tizen_7.0_hotfixtizen_7.0accepted/tizen_7.0_unified_hotfixaccepted/tizen_7.0_unified
Change-Id: If024fc99879aa6046632b54175a51fe6526ac09d
Signed-off-by: tarun.mahay <tarun.mahay@samsung.com>
-rwxr-xr-x | Apps/Apps.csproj | 4 | ||||
-rw-r--r-- | Apps/Core/AppLauncher.cs | 25 | ||||
-rwxr-xr-x | TrayApplication/Core/AppLauncher.cs | 38 | ||||
-rwxr-xr-x | packaging/org.tizen.Apps-1.0.0.tpk | bin | 58931 -> 59194 bytes | |||
-rwxr-xr-x | packaging/org.tizen.TrayApplication-1.0.0.tpk | bin | 228040 -> 228453 bytes |
5 files changed, 60 insertions, 7 deletions
diff --git a/Apps/Apps.csproj b/Apps/Apps.csproj index 49f56a4..17d4075 100755 --- a/Apps/Apps.csproj +++ b/Apps/Apps.csproj @@ -15,8 +15,8 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Tizen.NET" Version="10.0.0.17437" /> - <PackageReference Include="Tizen.NET.Sdk" Version="1.1.8" /> + <PackageReference Include="Tizen.NET" Version="10.0.0.17504" /> + <PackageReference Include="Tizen.NET.Sdk" Version="1.1.9" /> </ItemGroup> <ItemGroup> diff --git a/Apps/Core/AppLauncher.cs b/Apps/Core/AppLauncher.cs index 1b7630b..3c108d5 100644 --- a/Apps/Core/AppLauncher.cs +++ b/Apps/Core/AppLauncher.cs @@ -15,7 +15,9 @@ */ using Tizen.Applications; - +using Tizen.Applications.Exceptions; +using System; +using Apps.Common; namespace Apps.Core { public static class AppLauncher @@ -27,7 +29,26 @@ namespace Apps.Core ApplicationId = id, Operation = id == "org.tizen.homescreen-efl" ? AppControlOperations.Main : AppControlOperations.Default, }; - AppControl.SendLaunchRequest(appControl); + try + { + AppControl.SendLaunchRequest(appControl); + } + catch (LaunchRejectedException e) + { + Tizen.Log.Error(Resources.LogTag, "Launch Exception" + e.Message); + } + catch (ArgumentNullException e) + { + Tizen.Log.Error(Resources.LogTag, "Argument is null" + e.Message); + } + catch (InvalidOperationException e) + { + Tizen.Log.Error(Resources.LogTag, "Operation is invalid" + e.Message); + } + catch (TimeoutException e) + { + Tizen.Log.Error(Resources.LogTag, "app timeout" + e.Message); + } } } } diff --git a/TrayApplication/Core/AppLauncher.cs b/TrayApplication/Core/AppLauncher.cs index 88d98a1..690bbfc 100755 --- a/TrayApplication/Core/AppLauncher.cs +++ b/TrayApplication/Core/AppLauncher.cs @@ -16,7 +16,8 @@ using System; using Tizen.Applications; - +using Tizen.Applications.Exceptions; +using TrayApplication.Common; namespace TrayApplication.Core { static class AppLauncher @@ -31,8 +32,39 @@ namespace TrayApplication.Core ApplicationId = id, Operation = id == "org.tizen.homescreen-efl" ? AppControlOperations.Main : AppControlOperations.Default, }; - AppControl.SendLaunchRequest(appControl); - AppLaunched.Invoke(new object(), new EventArgs()); + try + { + AppControl.SendLaunchRequest(appControl); + AppLaunched.Invoke(new object(), new EventArgs()); + } + catch(LaunchRejectedException e) + { + Tizen.Log.Error(Resources.LogTag, "Launch Exception" + e.Message); + } + catch (ArgumentException e) + { + Tizen.Log.Error(Resources.LogTag, "Argument is invalid" + e.Message); + } + catch (AppNotFoundException e) + { + Tizen.Log.Error(Resources.LogTag, "App not found" + e.Message); + } + catch (LaunchFailedException e) + { + Tizen.Log.Error(Resources.LogTag, "Launch failed" + e.Message); + } + catch (Tizen.Applications.Exceptions.OutOfMemoryException e) + { + Tizen.Log.Error(Resources.LogTag, "Out of memory" + e.Message); + } + catch (PermissionDeniedException e) + { + Tizen.Log.Error(Resources.LogTag, "permission denied" + e.Message); + } + catch (TimeoutException e) + { + Tizen.Log.Error(Resources.LogTag, "app timeout" + e.Message); + } } } } diff --git a/packaging/org.tizen.Apps-1.0.0.tpk b/packaging/org.tizen.Apps-1.0.0.tpk Binary files differindex 6c401ea..8064a0e 100755 --- a/packaging/org.tizen.Apps-1.0.0.tpk +++ b/packaging/org.tizen.Apps-1.0.0.tpk diff --git a/packaging/org.tizen.TrayApplication-1.0.0.tpk b/packaging/org.tizen.TrayApplication-1.0.0.tpk Binary files differindex 0928287..00c1551 100755 --- a/packaging/org.tizen.TrayApplication-1.0.0.tpk +++ b/packaging/org.tizen.TrayApplication-1.0.0.tpk |