| Index: chrome/android/java/src/org/chromium/chrome/browser/firstrun/DataReductionProxyView.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/TosAndUmaView.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/DataReductionProxyView.java
|
| similarity index 73%
|
| copy from chrome/android/java/src/org/chromium/chrome/browser/firstrun/TosAndUmaView.java
|
| copy to chrome/android/java/src/org/chromium/chrome/browser/firstrun/DataReductionProxyView.java
|
| index 3c8ec646ae56b446f0187c1d5c414178575bd09b..52890aafa2acedb2853d40bb08488905d4e5005c 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/TosAndUmaView.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/DataReductionProxyView.java
|
| @@ -6,6 +6,7 @@ package org.chromium.chrome.browser.firstrun;
|
|
|
| import android.content.Context;
|
| import android.util.AttributeSet;
|
| +import android.view.View.MeasureSpec;
|
| import android.widget.FrameLayout;
|
| import android.widget.LinearLayout;
|
|
|
| @@ -13,11 +14,11 @@ import org.chromium.base.ApiCompatibilityUtils;
|
| import org.chromium.chrome.R;
|
|
|
| /**
|
| - * View that handles orientation changes for Terms of Service and UMA first run page.
|
| + * View that handles orientation changes for the Data Saver first run page.
|
| */
|
| -public class TosAndUmaView extends FrameLayout {
|
| +public class DataReductionProxyView extends FrameLayout {
|
|
|
| - public TosAndUmaView(Context context, AttributeSet attrs) {
|
| + public DataReductionProxyView(Context context, AttributeSet attrs) {
|
| super(context, attrs);
|
| }
|
|
|
| @@ -28,26 +29,19 @@ public class TosAndUmaView extends FrameLayout {
|
| int width = MeasureSpec.getSize(widthMeasureSpec);
|
| int height = MeasureSpec.getSize(heightMeasureSpec);
|
| LinearLayout content = (LinearLayout) findViewById(R.id.fre_content);
|
| - LinearLayout wrapper = (LinearLayout) findViewById(R.id.text_wrapper);
|
| - MarginLayoutParams params = (MarginLayoutParams) wrapper.getLayoutParams();
|
| int paddingStart = 0;
|
| if (width >= 2 * getResources().getDimension(R.dimen.fre_image_carousel_width)
|
| && width > height) {
|
| content.setOrientation(LinearLayout.HORIZONTAL);
|
| paddingStart = getResources().getDimensionPixelSize(R.dimen.fre_margin);
|
| - params.width = 0;
|
| - params.height = LayoutParams.WRAP_CONTENT;
|
| } else {
|
| content.setOrientation(LinearLayout.VERTICAL);
|
| - params.width = LayoutParams.WRAP_CONTENT;
|
| - params.height = 0;
|
| }
|
| ApiCompatibilityUtils.setPaddingRelative(content,
|
| paddingStart,
|
| content.getPaddingTop(),
|
| ApiCompatibilityUtils.getPaddingEnd(content),
|
| content.getPaddingBottom());
|
| - wrapper.setLayoutParams(params);
|
| super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
| }
|
| -}
|
| +}
|
|
|