[Applications.Common] Add filter key/value for installed storage 29/157329/11
authorSangyoon Jang <jeremy.jang@samsung.com>
Tue, 24 Oct 2017 07:35:52 +0000 (16:35 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Tue, 12 Dec 2017 02:39:27 +0000 (02:39 +0000)
Change-Id: Ibbc786d45cbe239e3149d35c5228fe695775322d
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/Tizen.Applications.Common/Tizen.Applications/ApplicationInfoFilter.cs
src/Tizen.Applications.Common/Tizen.Applications/ApplicationManager.cs

index d72c941..cae6890 100644 (file)
@@ -35,6 +35,31 @@ namespace Tizen.Applications
         }
 
         /// <summary>
+        /// This class is a possible value to use in the InstalledApplicationFilter.
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>
+        public static class Values
+        {
+            /// <summary>
+            /// A pre-defined value string for InstalledStorage key. This value means that the application is installed at internal storage.
+            /// </summary>
+            /// <since_tizen> 5 </since_tizen>
+            public const string InstalledInternal = "installed_internal";
+
+            /// <summary>
+            /// A pre-defined value string for InstalledStorage key. This value means that the application is installed at external storage.
+            /// </summary>
+            /// <since_tizen> 5 </since_tizen>
+            public const string InstalledExternal = "installed_external";
+
+            /// <summary>
+            /// A pre-defined value string for InstalledStorage key. This value means that the application is installed at extended storage.
+            /// </summary>
+            /// <since_tizen> 5 </since_tizen>
+            public const string InstalledExtended = "installed_extended";
+        }
+
+        /// <summary>
         /// This class is a possible key to use in the InstalledApplicationFilter.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
@@ -56,6 +81,11 @@ namespace Tizen.Applications
             /// <since_tizen> 3 </since_tizen>
             public const string Category = "PACKAGE_INFO_PROP_APP_CATEGORY";
             /// <summary>
+            /// A key to filter by installed storage.
+            /// </summary>
+            /// <since_tizen> 5 </since_tizen>
+            public const string InstalledStorage = "PACKAGE_INFO_PROP_APP_INSTALLED_STORAGE";
+            /// <summary>
             /// A key to filter by nodisplay attribute.
             /// </summary>
             /// <since_tizen> 3 </since_tizen>
index fc7c130..719a5ed 100755 (executable)
@@ -546,7 +546,8 @@ namespace Tizen.Applications
             {
                 if ((item.Key == ApplicationInfoFilter.Keys.Id) ||
                     (item.Key == ApplicationInfoFilter.Keys.Type) ||
-                    (item.Key == ApplicationInfoFilter.Keys.Category))
+                    (item.Key == ApplicationInfoFilter.Keys.Category) ||
+                    (item.Key == ApplicationInfoFilter.Keys.InstalledStorage))
                 {
                     err = Interop.ApplicationManager.AppInfoFilterAddString(infoHandle, item.Key, item.Value);
                 }