Code example for ActivityInfo

Methods: getIconResource

0
        return label.toString();
    } 
 
    private String findIcon() {
        // Try the activity or application icon. 
        int iconId = mActivityInfo.getIconResource();
        if (DBG) Log.d(LOG_TAG, getComponentName() + " activity icon = " + iconId);
        // No icon, use default activity icon 
        if (iconId == 0) {
            iconId = android.R.drawable.sym_def_app_icon;
        } 
        return new StringBuilder(mPackageResourceUriPrefix).append(iconId).toString();
    } 
 
    @Override 
    public String toString() {
        return super.toString() + "{component=" + mFlattenedComponentName + "}";
    } 
 
    /** 
     * Factory method. Creates a suggestion source from the searchable