| Index: customtabs/src/android/support/customtabs/CustomTabsSession.java
|
| diff --git a/customtabs/src/android/support/customtabs/CustomTabsSession.java b/customtabs/src/android/support/customtabs/CustomTabsSession.java
|
| index a51cf0ea1eca8e2a59a5bf32e74f3de554cd341b..09c796b2b583abb864b9995fec4a846956b8e848 100644
|
| --- a/customtabs/src/android/support/customtabs/CustomTabsSession.java
|
| +++ b/customtabs/src/android/support/customtabs/CustomTabsSession.java
|
| @@ -68,14 +68,23 @@ public final class CustomTabsSession {
|
| }
|
|
|
| /**
|
| - * Update the visuals for the button on a custom tab. Will only succeed if the given
|
| - * session is the active one in browser.
|
| + * @see {@link #setActionButton(Bitmap, String)}
|
| + */
|
| + public boolean setActionButton(@NonNull Bitmap icon, @NonNull String description) {
|
| + return setActionButton(CustomTabsIntent.TOOLBAR_ACTION_BUTTON_ID, icon, description);
|
| + }
|
| +
|
| + /**
|
| + * Updates the visuals for custom action buttons. Will only succeed if the given
|
| + * session is the active one in browser and the given id is valid.
|
| + * @param id The id for the button to update.
|
| * @param icon The new icon of the action button.
|
| * @param description Content description of the action button.
|
| * @return Whether the update succeeded.
|
| */
|
| - public boolean setActionButton(@NonNull Bitmap icon, @NonNull String description) {
|
| + public boolean setActionButton(int id, @NonNull Bitmap icon, @NonNull String description) {
|
| Bundle bundle = new Bundle();
|
| + bundle.putInt(CustomTabsIntent.KEY_ID, id);
|
| bundle.putParcelable(CustomTabsIntent.KEY_ICON, icon);
|
| bundle.putString(CustomTabsIntent.KEY_DESCRIPTION, description);
|
|
|
|
|