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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java

Issue 2847523002: Android: Remove GetApplicationContext part 4 (Closed)
Patch Set: Rebase and fix build 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/util/FeatureUtilities.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
index e1bb9e01e47190499cdabe63db3af3d39bb76b88..46794328b0c65a54e0e2e204608d55f5c311c222 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
@@ -131,7 +131,7 @@ public class FeatureUtilities {
*/
public static boolean isDocumentModeEligible(Context context) {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP
- && !DeviceFormFactor.isTablet(context);
+ && !DeviceFormFactor.isTablet();
}
/**
@@ -239,10 +239,8 @@ public class FeatureUtilities {
* Cache whether or not Chrome Home is enabled.
*/
public static void cacheChromeHomeEnabled() {
- Context context = ContextUtils.getApplicationContext();
-
// Chrome Home doesn't work with tablets.
- if (DeviceFormFactor.isTablet(context)) return;
+ if (DeviceFormFactor.isTablet()) return;
boolean isChromeHomeEnabled = ChromeFeatureList.isEnabled(ChromeFeatureList.CHROME_HOME);
ChromePreferenceManager manager = ChromePreferenceManager.getInstance();

Powered by Google App Engine
This is Rietveld 408576698