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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java

Issue 136343002: Remove Chrome for TV code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 11 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: content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java b/content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java
index 17c82359343885dd49dc599272fa210133fc071f..f472dc94c19b6061cf81e54c965793c3040186a9 100644
--- a/content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java
+++ b/content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java
@@ -5,7 +5,6 @@
package org.chromium.content.browser;
import android.content.Context;
-import android.content.pm.PackageManager;
import org.chromium.base.CommandLine;
import org.chromium.content.common.ContentSwitches;
@@ -20,7 +19,6 @@ public class DeviceUtils {
*/
private static final int MINIMUM_TABLET_WIDTH_DP = 600;
- private static Boolean sIsTv = null;
private static Boolean sIsTablet = null;
/**
@@ -29,10 +27,6 @@ public class DeviceUtils {
*/
public static boolean isTablet(Context context) {
if (sIsTablet == null) {
- if (isTv(context)) {
- sIsTablet = true;
- return sIsTablet;
- }
int minimumScreenWidthDp = context.getResources().getConfiguration().
smallestScreenWidthDp;
sIsTablet = minimumScreenWidthDp >= MINIMUM_TABLET_WIDTH_DP;
@@ -41,26 +35,6 @@ public class DeviceUtils {
}
/**
- * Checks if the device should be treated as TV. Note that this should be
- * invoked before {@link #isTablet(Context)} to get the correct result
- * since they are not orthogonal.
- *
- * @param context Android context
- * @return {@code true} if the device should be treated as TV.
- */
- public static boolean isTv(Context context) {
- if (sIsTv == null) {
- PackageManager manager = context.getPackageManager();
- if (manager != null) {
- sIsTv = manager.hasSystemFeature(PackageManager.FEATURE_TELEVISION);
- return sIsTv;
- }
- sIsTv = false;
- }
- return sIsTv;
- }
-
- /**
* Appends the switch specifying which user agent should be used for this device.
* @param context The context for the caller activity.
*/
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/android/java/src/org/chromium/content/browser/PepperPluginManager.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698