From f4040e4e969aa39e41fe8700b17b57f1835f5f5c Mon Sep 17 00:00:00 2001 From: Yusuf Ozuysal Date: Mon, 1 Feb 2016 11:17:13 -0800 Subject: [PATCH] Naming fixes to bottom bar color extra Change the extra name after API review. BUG=579626 Review URL: https://codereview.chromium.org/1657853002 . Cr-Commit-Position: refs/branch-heads/2623@{#217} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907} --- .../src/android/support/customtabs/CustomTabsIntent.java | 8 ++++---- .../browser/customtabs/CustomTabIntentDataProvider.java | 6 +++--- .../chrome/browser/customtabs/CustomTabActivityTest.java | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) 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);