Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4880)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java

Issue 2847523002: Android: Remove GetApplicationContext part 4 (Closed)
Patch Set: fix cronet Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
index bbf2c77cb5e52f508ccdf5357587f577ac88e64d..d4c09a65aae54c8b611f1b36801c81987e1f806c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
@@ -512,7 +512,7 @@ class SuggestionView extends ViewGroup {
}
classifications.add(0, new MatchClassification(0, MatchClassificationStyle.NONE));
- if (DeviceFormFactor.isTablet(getContext())) {
+ if (DeviceFormFactor.isTablet()) {
TextPaint tp = mContentsView.mTextLine1.getPaint();
mContentsView.mRequiredWidth =
tp.measureText(fillIntoEdit, 0, fillIntoEdit.length());
@@ -736,7 +736,7 @@ class SuggestionView extends ViewGroup {
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
- if (DeviceFormFactor.isTablet(getContext())) {
+ if (DeviceFormFactor.isTablet()) {
// Use the same image transform matrix as the navigation icon to ensure the same
// scaling, which requires centering vertically based on the height of the
// navigation icon view and not the image itself.
@@ -824,7 +824,7 @@ class SuggestionView extends ViewGroup {
mTextLeft = getSuggestionTextLeftPosition();
mTextRight = getSuggestionTextRightPosition();
boolean isRTL = ApiCompatibilityUtils.isLayoutRtl(this);
- if (DeviceFormFactor.isTablet(getContext())) {
+ if (DeviceFormFactor.isTablet()) {
int textWidth = isRTL ? mTextRight : (r - l - mTextLeft);
final float maxRequiredWidth = mSuggestionDelegate.getMaxRequiredWidth();
final float maxMatchContentsWidth = mSuggestionDelegate.getMaxMatchContentsWidth();

Powered by Google App Engine
This is Rietveld 408576698