Code example for SearchableInfo

Methods: getSearchActivity, getSuggestPackage

0
    } 
 
    @Override 
    protected String getIconPackage() {
        // Get icons from the package containing the suggestion provider, if any 
        String iconPackage = mSearchable.getSuggestPackage();
        if (iconPackage != null) {
            return iconPackage;
        } else { 
            // Fall back to the package containing the searchable activity 
            return mSearchable.getSearchActivity().getPackageName();
        } 
    } 
 
    public CharSequence getLabel() {
        if (mLabel == null) {
            // Load label lazily 
            mLabel = mActivityInfo.loadLabel(getContext().getPackageManager());
        } 
        return mLabel;
    }