Don't use small mode on TVs

This commit is contained in:
Cameron Gutman 2015-02-01 18:20:39 -05:00
parent 7e1884acb5
commit f0b22f9119

View File

@ -2,6 +2,7 @@ package com.limelight.preferences;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.preference.PreferenceManager;
public class PreferenceConfiguration {
@ -67,6 +68,12 @@ public class PreferenceConfiguration {
}
public static boolean getDefaultSmallMode(Context context) {
PackageManager manager = context.getPackageManager();
if (manager != null && manager.hasSystemFeature(PackageManager.FEATURE_TELEVISION)) {
// TVs shouldn't use small mode by default
return false;
}
// Use small mode on anything smaller than a 7" tablet
return context.getResources().getConfiguration().smallestScreenWidthDp < 600;
}