diff options
author | jongmyeong ko <jongmyeong.ko@samsung.com> | 2017-03-16 23:29:25 -0700 |
---|---|---|
committer | jongmyeong ko <jongmyeong.ko@samsung.com> | 2017-03-17 04:16:04 -0700 |
commit | 3eb70a00300008cc8d36ae59cd55a5c13282ff3a (patch) | |
tree | 438c4e949fc3ff05b3aa505a651e8cb90eee005e | |
parent | 5976cd8ede61cb7e03e7d1005c2a82c62c685fc3 (diff) | |
download | application-3eb70a00300008cc8d36ae59cd55a5c13282ff3a.tar.gz application-3eb70a00300008cc8d36ae59cd55a5c13282ff3a.tar.bz2 application-3eb70a00300008cc8d36ae59cd55a5c13282ff3a.zip |
Revert "Add new API for getting filtered count"
there is other way to get count from the result using C# lib.
using System.Ling;
pkglist = PackageManger.GetPackages(filter);
pkglist.Count(); //
This reverts commit 7b56cf8bf7696418ac3ac4975cde6845c75f732c.
Change-Id: Ic52160b9d8e2ad0d5f0cbccbf8ff5c306103a2e0
3 files changed, 1 insertions, 49 deletions
diff --git a/Tizen.Applications.PackageManager/Interop/Interop.PackageManager.cs b/Tizen.Applications.PackageManager/Interop/Interop.PackageManager.cs index a58b128..e8fac2d 100644 --- a/Tizen.Applications.PackageManager/Interop/Interop.PackageManager.cs +++ b/Tizen.Applications.PackageManager/Interop/Interop.PackageManager.cs @@ -46,8 +46,7 @@ internal static partial class Interop IoError = Tizen.Internals.Errors.ErrorCode.IoError, NoSuchPackage = -0x01150000 | 0x71, SystemError = -0x01150000 | 0x72, - PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied, - InvalidOperation = Tizen.Internals.Errors.ErrorCode.InvalidOperation + PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied } // Any change here might require changes in Tizen.Applications.PackageEventState enum diff --git a/Tizen.Applications.PackageManager/Tizen.Applications/PackageFilter.cs b/Tizen.Applications.PackageManager/Tizen.Applications/PackageFilter.cs index 2a4c57e..8ebff43 100755 --- a/Tizen.Applications.PackageManager/Tizen.Applications/PackageFilter.cs +++ b/Tizen.Applications.PackageManager/Tizen.Applications/PackageFilter.cs @@ -15,7 +15,6 @@ */ using System.Collections.Generic; -using System.Linq; namespace Tizen.Applications { @@ -25,7 +24,6 @@ namespace Tizen.Applications public class PackageFilter { private IDictionary<string, bool> _filter; - private int _filteredCount = -1; /// <summary> /// Default constructor with empty filter list. All installed applications will satisfy this filter unless updated with more specific filters. @@ -55,45 +53,6 @@ namespace Tizen.Applications } /// <summary> - /// Gets the filtered item count from the given filtered result which was retrieved using GetPackages method, previously. - /// </summary> - /// <param name="filteredList">filtered list</param> - /// <exception cref="ArgumentException">Thrown when failed when input filtered list is invalid</exception> - public int GetCount(IEnumerable<Package> filteredList) - { - if (filteredList == null) - { - throw PackageManagerErrorFactory.GetException(Interop.PackageManager.ErrorCode.InvalidParameter, "the parameter is null"); - } - return filteredList.Count(); - } - - /// <summary> - /// Gets the filtered count from the latest result of GetPackages method call. - /// </summary> - /// <remarks> - /// For the valid result, the method, Getpackages(PackageFilter filter), should be called once before. - /// The return value of this API can be same with GetCount(filteredList) if the filteredList is the result of the latest GetPackages method call. - /// </remarks> - /// <exception cref="InvalidOperationException">Thrown when failed when there is no valid fitered result</exception> - public int GetCount() - { - if (_filteredCount < 0) - { - throw PackageManagerErrorFactory.GetException(Interop.PackageManager.ErrorCode.InvalidOperation, "there is no valid filtered result"); - } - return _filteredCount; - } - - internal int FilteredCount - { - set - { - _filteredCount = value; - } - } - - /// <summary> /// This class contains possible keys for filter to be used in the GetPackages method. /// </summary> public static class Keys diff --git a/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs b/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs index 950d2d5..738e3c3 100644 --- a/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs +++ b/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs @@ -329,12 +329,6 @@ namespace Tizen.Applications { Log.Warn(LogTag, string.Format("Failed to destroy package filter handle. err = {0}", err)); } - - if (filter != null) - { - filter.FilteredCount = packageList.Count; - } - return packageList; } |