summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/current.xml13
-rw-r--r--core/java/android/app/SearchManager.java19
2 files changed, 30 insertions, 2 deletions
diff --git a/api/current.xml b/api/current.xml
index 7acbccbad223..92540b1f9715 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -23739,6 +23739,19 @@
</implements>
<implements name="android.content.DialogInterface.OnDismissListener">
</implements>
+<method name="getSearchableInfo"
+ return="android.app.SearchableInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="componentName" type="android.content.ComponentName">
+</parameter>
+</method>
<method name="getSearchablesInGlobalSearch"
return="java.util.List&lt;android.app.SearchableInfo&gt;"
abstract="false"
diff --git a/core/java/android/app/SearchManager.java b/core/java/android/app/SearchManager.java
index 5961ef55924e..a75e8dc8c0ff 100644
--- a/core/java/android/app/SearchManager.java
+++ b/core/java/android/app/SearchManager.java
@@ -2030,8 +2030,23 @@ public class SearchManager
}
/**
- * Gets information about a searchable activity. This method is static so that it can
- * be used from non-Activity contexts.
+ * Gets information about a searchable activity.
+ *
+ * @param componentName The activity to get searchable information for.
+ * @return Searchable information, or <code>null</code> if the activity does not
+ * exist, or is not searchable.
+ */
+ public SearchableInfo getSearchableInfo(ComponentName componentName) {
+ try {
+ return mService.getSearchableInfo(componentName, false);
+ } catch (RemoteException ex) {
+ Log.e(TAG, "getSearchableInfo() failed: " + ex);
+ return null;
+ }
+ }
+
+ /**
+ * Gets information about a searchable activity.
*
* @param componentName The activity to get searchable information for.
* @param globalSearch If <code>false</code>, return information about the given activity.