| Index: chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarPhone.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarPhone.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarPhone.java
|
| index fa19657f3fb080b2a265ba57abf19e20483af401..f9d8c85e7901e6dd829d526e70037e05faa51dc6 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarPhone.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarPhone.java
|
| @@ -13,7 +13,6 @@ import android.text.Selection;
|
| import android.util.AttributeSet;
|
| import android.view.TouchDelegate;
|
| import android.view.View;
|
| -import android.view.ViewStub;
|
| import android.view.WindowManager;
|
| import android.view.animation.Interpolator;
|
| import android.widget.FrameLayout;
|
| @@ -41,17 +40,16 @@ public class LocationBarPhone extends LocationBarLayout {
|
|
|
| private View mFirstVisibleFocusedView;
|
| private View mIncognitoBadge;
|
| + private View mGoogleGContainer;
|
| + private View mGoogleG;
|
| private View mUrlActionsContainer;
|
| private int mIncognitoBadgePadding;
|
| + private int mGoogleGWidth;
|
| + private int mGoogleGMargin;
|
| private float mUrlFocusChangePercent;
|
| private Runnable mKeyboardResizeModeTask;
|
| private ObjectAnimator mOmniboxBackgroundAnimator;
|
|
|
| - private ViewStub mGoogleGContainer;
|
| - private View mGoogleG;
|
| - private int mGoogleGWidth;
|
| - private int mGoogleGMargin;
|
| -
|
| /**
|
| * Constructor used to inflate from XML.
|
| */
|
| @@ -68,7 +66,8 @@ public class LocationBarPhone extends LocationBarLayout {
|
| mIncognitoBadgePadding =
|
| getResources().getDimensionPixelSize(R.dimen.location_bar_incognito_badge_padding);
|
|
|
| - mGoogleGContainer = (ViewStub) findViewById(R.id.google_g_container_stub);
|
| + mGoogleGContainer = findViewById(R.id.google_g_container);
|
| + mGoogleG = findViewById(R.id.google_g);
|
| mGoogleGWidth = getResources().getDimensionPixelSize(R.dimen.location_bar_google_g_width);
|
| mGoogleGMargin = getResources().getDimensionPixelSize(R.dimen.location_bar_google_g_margin);
|
|
|
| @@ -237,15 +236,11 @@ public class LocationBarPhone extends LocationBarLayout {
|
| // If the default search engine is not Google, isLocationBarShownInNTP() will return false.
|
| if (ntp == null || !ntp.isLocationBarShownInNTP()
|
| || !ChromeFeatureList.isEnabled(ChromeFeatureList.NTP_SHOW_GOOGLE_G_IN_OMNIBOX)) {
|
| + mGoogleGContainer.setVisibility(View.GONE);
|
| return;
|
| }
|
|
|
| - // Inflate the resource if it hasn't been done yet.
|
| - if (mGoogleG == null) {
|
| - mGoogleGContainer.inflate();
|
| - mGoogleG = findViewById(R.id.google_g);
|
| - }
|
| -
|
| + mGoogleGContainer.setVisibility(View.VISIBLE);
|
| float animationProgress =
|
| GOOGLE_G_FADE_INTERPOLATOR.getInterpolation(mUrlFocusChangePercent);
|
|
|
|
|