Skip to content
This repository was archived by the owner on Apr 3, 2020. It is now read-only.

Commit f4040e4

Browse files
author
Yusuf Ozuysal
committed
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: 92d7753-refs/heads/master@{#369907}
1 parent 351c3e6 commit f4040e4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

chrome/android/java/src/android/support/customtabs/CustomTabsIntent.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ public class CustomTabsIntent {
155155
public static final int TOOLBAR_ACTION_BUTTON_ID = 0;
156156

157157
/**
158-
* Extra that changes the background color for the custom action bar. The value should be an int
159-
* that specifies a {@link Color}, not a resource id.
158+
* Extra that changes the background color for the secondary action bar. The value should be an
159+
* int that specifies a {@link Color}, not a resource id.
160160
*/
161-
public static final String EXTRA_CUSTOM_ACTION_BAR_COLOR =
162-
"android.support.customtabs.extra.CUSTOM_ACTION_BAR_COLOR";
161+
public static final String EXTRA_SECONDARY_ACTION_BAR_COLOR =
162+
"android.support.customtabs.extra.SECONDARY_ACTION_BAR_COLOR";
163163

164164
/**
165165
* Convenience method to create a VIEW intent without a session for the given package.

chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public CustomTabIntentDataProvider(Intent intent, Context context) {
7676
mSession = IntentUtils.safeGetBinderExtra(intent, CustomTabsIntent.EXTRA_SESSION);
7777
retrieveCustomButtons(intent, context);
7878
retrieveToolbarColor(intent, context);
79-
retrieveBottomBarColor(intent, context);
79+
retrieveBottomBarColor(intent);
8080
mEnableUrlBarHiding = IntentUtils.safeGetBooleanExtra(
8181
intent, CustomTabsIntent.EXTRA_ENABLE_URLBAR_HIDING, true);
8282
mKeepAliveServiceIntent = IntentUtils.safeGetParcelableExtra(intent, EXTRA_KEEP_ALIVE);
@@ -147,10 +147,10 @@ private void retrieveToolbarColor(Intent intent, Context context) {
147147
/**
148148
* Must be called after calling {@link #retrieveToolbarColor(Intent, Context)}.
149149
*/
150-
private void retrieveBottomBarColor(Intent intent, Context context) {
150+
private void retrieveBottomBarColor(Intent intent) {
151151
int defaultColor = mToolbarColor;
152152
int color = IntentUtils.safeGetIntExtra(intent,
153-
CustomTabsIntent.EXTRA_CUSTOM_ACTION_BAR_COLOR, defaultColor);
153+
CustomTabsIntent.EXTRA_SECONDARY_ACTION_BAR_COLOR, defaultColor);
154154
mBottomBarColor = removeTransparencyFromColor(color, defaultColor);
155155
}
156156

chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ public void testBottomBar() throws InterruptedException {
501501
bundles.add(bundle);
502502
}
503503
intent.putExtra(CustomTabsIntent.EXTRA_ACTION_BAR_ITEMS, bundles);
504-
intent.putExtra(CustomTabsIntent.EXTRA_CUSTOM_ACTION_BAR_COLOR, barColor);
504+
intent.putExtra(CustomTabsIntent.EXTRA_SECONDARY_ACTION_BAR_COLOR, barColor);
505505
startCustomTabActivityWithIntent(intent);
506506

507507
ViewGroup bottomBar = (ViewGroup) getActivity().findViewById(R.id.bottombar);

0 commit comments

Comments
 (0)