public static List<BrowserActionItem> parseBrowserActionItems(ArrayList<Bundle> bundles) {
        List<BrowserActionItem> mActions = new ArrayList<>();
        for (int i = 0; i < bundles.size(); i++) {
            Bundle bundle = bundles.get(i);
            String title = bundle.getString(KEY_TITLE);
            PendingIntent action = bundle.getParcelable(KEY_ACTION);
            @DrawableRes
            int iconId = bundle.getInt(KEY_ICON_ID);
            Uri iconUri = bundle.getParcelable(KEY_ICON_URI);
            if (!TextUtils.isEmpty(title) && action != null) {
                BrowserActionItem item;
                if (iconId != 0) {
                    item = new BrowserActionItem(title, action, iconId);
                } else {
                    item = new BrowserActionItem(title, action, iconUri);
                }
                mActions.add(item);
            } else {
                throw new IllegalArgumentException(
                        "Custom item should contain a non-empty title and non-null intent.");
            }
        }
        return mActions;
    }
Gets custom item list for browser action menu.
@param bundles Data for custom items from {@link BrowserActionsIntent}.
@return List of {@link BrowserActionItem}
customtabs/src/android/support/customtabs/browseractions/BrowserActionsIntent.java