diff --git a/chrome/android/java/src/android/support/customtabs/CustomTabsIntent.java b/chrome/android/java/src/android/support/customtabs/CustomTabsIntent.java index 02e196893fca9..9693c9767215a 100644 --- a/chrome/android/java/src/android/support/customtabs/CustomTabsIntent.java +++ b/chrome/android/java/src/android/support/customtabs/CustomTabsIntent.java @@ -155,11 +155,11 @@ public class CustomTabsIntent { public static final int TOOLBAR_ACTION_BUTTON_ID = 0; /** - * Extra that changes the background color for the custom action bar. The value should be an int - * that specifies a {@link Color}, not a resource id. + * Extra that changes the background color for the secondary action bar. The value should be an + * int that specifies a {@link Color}, not a resource id. */ - public static final String EXTRA_CUSTOM_ACTION_BAR_COLOR = - "android.support.customtabs.extra.CUSTOM_ACTION_BAR_COLOR"; + public static final String EXTRA_SECONDARY_ACTION_BAR_COLOR = + "android.support.customtabs.extra.SECONDARY_ACTION_BAR_COLOR"; /** * Convenience method to create a VIEW intent without a session for the given package. diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java index ce5f1a586c8e3..958835bffce6d 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java @@ -76,7 +76,7 @@ public CustomTabIntentDataProvider(Intent intent, Context context) { mSession = IntentUtils.safeGetBinderExtra(intent, CustomTabsIntent.EXTRA_SESSION); retrieveCustomButtons(intent, context); retrieveToolbarColor(intent, context); - retrieveBottomBarColor(intent, context); + retrieveBottomBarColor(intent); mEnableUrlBarHiding = IntentUtils.safeGetBooleanExtra( intent, CustomTabsIntent.EXTRA_ENABLE_URLBAR_HIDING, true); mKeepAliveServiceIntent = IntentUtils.safeGetParcelableExtra(intent, EXTRA_KEEP_ALIVE); @@ -147,10 +147,10 @@ private void retrieveToolbarColor(Intent intent, Context context) { /** * Must be called after calling {@link #retrieveToolbarColor(Intent, Context)}. */ - private void retrieveBottomBarColor(Intent intent, Context context) { + private void retrieveBottomBarColor(Intent intent) { int defaultColor = mToolbarColor; int color = IntentUtils.safeGetIntExtra(intent, - CustomTabsIntent.EXTRA_CUSTOM_ACTION_BAR_COLOR, defaultColor); + CustomTabsIntent.EXTRA_SECONDARY_ACTION_BAR_COLOR, defaultColor); mBottomBarColor = removeTransparencyFromColor(color, defaultColor); } diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java index 2f1cd3611f7bd..43c8065ff0606 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java @@ -501,7 +501,7 @@ public void testBottomBar() throws InterruptedException { bundles.add(bundle); } intent.putExtra(CustomTabsIntent.EXTRA_ACTION_BAR_ITEMS, bundles); - intent.putExtra(CustomTabsIntent.EXTRA_CUSTOM_ACTION_BAR_COLOR, barColor); + intent.putExtra(CustomTabsIntent.EXTRA_SECONDARY_ACTION_BAR_COLOR, barColor); startCustomTabActivityWithIntent(intent); ViewGroup bottomBar = (ViewGroup) getActivity().findViewById(R.id.bottombar);