Index: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java |
index 7c09524aace87a747fb8016bb8a80c738e844b8d..c6225c5bda436e350b1db4f3db02ec0150cbf201 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java |
@@ -340,6 +340,12 @@ public class CustomTabActivity extends ChromeActivity { |
ApiCompatibilityUtils.setStatusBarColor(getWindow(), |
ColorUtils.getDarkenedColorForStatusBar(toolbarColor)); |
} |
+ // Properly attach tab's infobar to the view hierarchy, as the main tab might have been |
+ // initialized prior to inflation. |
+ if (mMainTab != null) { |
+ ViewGroup bottomContainer = (ViewGroup) findViewById(R.id.bottom_container); |
+ mMainTab.getInfoBarContainer().setParentView(bottomContainer); |
+ } |
// Setting task title and icon to be null will preserve the client app's title and icon. |
ApiCompatibilityUtils.setTaskDescription(this, null, null, toolbarColor); |