[PackageManager] Fixed svace warnings
authorDinesh Dwivedi <dinesh.d@samsung.com>
Thu, 28 Jul 2016 16:39:19 +0000 (22:09 +0530)
committerWonYoung Choi <wy80.choi@samsung.com>
Mon, 24 Oct 2016 00:46:12 +0000 (09:46 +0900)
Change-Id: I987e2dd7b80956ebf4e131b98cb00c15d106cfab
Signed-off-by: Dinesh Dwivedi <dinesh.d@samsung.com>
Tizen.Applications/Tizen.Applications/PackageCertificate.cs
Tizen.Applications/Tizen.Applications/PackageManager.cs

index cec4503..ddf8052 100644 (file)
@@ -82,7 +82,7 @@ namespace Tizen.Applications
 
         private static string GetValue(IDictionary<Interop.Package.CertificateType, string> dict, Interop.Package.CertificateType key)
         {
-            string value = string.Empty;
+            string value;
             dict.TryGetValue(key, out value);
             return value;
         }
index 4aefb1f..e8fe1c0 100644 (file)
@@ -114,7 +114,7 @@ namespace Tizen.Applications
         /// <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
         public static string GetPackageIdByApplicationId(string applicationId)
         {
-            string packageId = string.Empty;
+            string packageId;
             var err = Interop.PackageManager.PackageManageGetPackageIdByAppId(applicationId, out packageId);
             if (err != Interop.PackageManager.ErrorCode.None)
             {
@@ -427,18 +427,17 @@ namespace Tizen.Applications
             {
                 try
                 {
-                    PackageManagerEventArgs eventArgs = new PackageManagerEventArgs(packageType, packageId, (PackageEventState)eventState, progress);
                     if (eventType == Interop.PackageManager.EventType.Install)
                     {
-                        s_installEventHandler?.Invoke(null, eventArgs);
+                        s_installEventHandler?.Invoke(null, new PackageManagerEventArgs(packageType, packageId, (PackageEventState)eventState, progress));
                     }
                     else if (eventType == Interop.PackageManager.EventType.Uninstall)
                     {
-                        s_uninstallEventHandler?.Invoke(null, eventArgs);
+                        s_uninstallEventHandler?.Invoke(null, new PackageManagerEventArgs(packageType, packageId, (PackageEventState)eventState, progress));
                     }
                     else if (eventType == Interop.PackageManager.EventType.Update)
                     {
-                        s_updateEventHandler?.Invoke(null, eventArgs);
+                        s_updateEventHandler?.Invoke(null, new PackageManagerEventArgs(packageType, packageId, (PackageEventState)eventState, progress));
                     }
                 }
                 catch (Exception e)