Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0408675d authored by Bjorn Bringert's avatar Bjorn Bringert
Browse files

Add and expose SearchManager.getSearchableInfo()

This method is needed by QuickSearchBox to get the searchability
meta-data for an activity.

Change-Id: I1b7a72d4dde1ff15410288cfdc33c043738be977
parent 7240b504
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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"
+17 −2
Original line number Diff line number Diff line
@@ -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.