Commit e5f0bba3 authored by Nicolas Dossou-gbete's avatar Nicolas Dossou-gbete Committed by Commit Bot

Fix lint issues with TileGridLayout.java

Bug: None
Change-Id: I967dcf8315ea3f40fc89cb0fe54da83499ab4b52
Reviewed-on: https://chromium-review.googlesource.com/574921Reviewed-by: default avatarMichael van Ouwerkerk <mvanouwerkerk@chromium.org>
Commit-Queue: Nicolas Dossou-Gbété <dgn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488194}
parent 30c697e2
......@@ -4,6 +4,7 @@
package org.chromium.chrome.browser.ntp;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.Resources;
import android.util.AttributeSet;
......@@ -87,9 +88,9 @@ public class NewTabPageLayout extends LinearLayout {
mBottomSpacer = findViewById(R.id.ntp_bottom_spacer);
mLogoSpacer = findViewById(R.id.search_provider_logo_spacer);
mSearchBoxSpacer = findViewById(R.id.search_box_spacer);
mSearchProviderLogoView = (LogoView) findViewById(R.id.search_provider_logo);
mSearchProviderLogoView = findViewById(R.id.search_provider_logo);
mSearchBoxView = findViewById(R.id.search_box);
mTileGridLayout = (TileGridLayout) findViewById(R.id.tile_grid_layout);
mTileGridLayout = findViewById(R.id.tile_grid_layout);
}
/**
......@@ -117,6 +118,8 @@ public class NewTabPageLayout extends LinearLayout {
* - If our contents can fit on the screen, increase the spacing to fill the space (minus space
* for the CardsUI Peeking card).
*/
@SuppressLint("WrongCall") // We explicitly call super.onMeasure() as we have multiple measuring
// passes and adjust the UI depending on the result of the previous.
private void calculateVerticalSpacing(int widthMeasureSpec, int heightMeasureSpec) {
mLogoSpacer.setVisibility(View.GONE);
mSearchBoxSpacer.setVisibility(View.GONE);
......
......@@ -87,7 +87,8 @@ public final class NewTabPageUma {
* Possible results when sizing the NewTabPageLayout.
* Do not remove or change existing values other than NUM_NTP_LAYOUT_RESULTS.
*/
@IntDef({NTP_LAYOUT_DOES_NOT_FIT, NTP_LAYOUT_FITS_WITHOUT_FIELD_TRIAL,
@IntDef({NTP_LAYOUT_DOES_NOT_FIT, NTP_LAYOUT_DOES_NOT_FIT_PUSH_MOST_LIKELY,
NTP_LAYOUT_FITS_NO_FIELD_TRIAL, NTP_LAYOUT_FITS_WITHOUT_FIELD_TRIAL,
NTP_LAYOUT_FITS_WITH_FIELD_TRIAL, NTP_LAYOUT_CONDENSED, NUM_NTP_LAYOUT_RESULTS})
@Retention(RetentionPolicy.SOURCE)
public @interface NTPLayoutResult {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment