diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2013-08-20 18:17:12 +0200 |
---|---|---|
committer | Jorge Ruesga <jorge@ruesga.com> | 2013-08-20 18:17:12 +0200 |
commit | 7cb4c7201b479f4877b7f2fb1a631604cdcd8037 (patch) | |
tree | 35f8f3a743dbef0313dfd03092c5334ab2141638 /src/org/cyanogenmod/wallpapers/photophase/utils | |
parent | 5b318e577df0406741c2c107f95f4e5c7a8a0590 (diff) | |
download | android_packages_wallpapers_PhotoPhase-7cb4c7201b479f4877b7f2fb1a631604cdcd8037.tar.gz android_packages_wallpapers_PhotoPhase-7cb4c7201b479f4877b7f2fb1a631604cdcd8037.tar.bz2 android_packages_wallpapers_PhotoPhase-7cb4c7201b479f4877b7f2fb1a631604cdcd8037.zip |
Improve quality image on tablets
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Diffstat (limited to 'src/org/cyanogenmod/wallpapers/photophase/utils')
-rw-r--r-- | src/org/cyanogenmod/wallpapers/photophase/utils/Utils.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/org/cyanogenmod/wallpapers/photophase/utils/Utils.java b/src/org/cyanogenmod/wallpapers/photophase/utils/Utils.java index ec5e0e8..65d7f97 100644 --- a/src/org/cyanogenmod/wallpapers/photophase/utils/Utils.java +++ b/src/org/cyanogenmod/wallpapers/photophase/utils/Utils.java @@ -17,6 +17,7 @@ package org.cyanogenmod.wallpapers.photophase.utils; import android.content.Context; +import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.RectF; import android.util.DisplayMetrics; @@ -44,6 +45,17 @@ public class Utils { } /** + * Used to determine if the device is a tablet or not + * + * @param context The {@link Context} to use. + * @return True if the device is a tablet, false otherwise. + */ + public static final boolean isTablet(final Context context) { + final int layout = context.getResources().getConfiguration().screenLayout; + return (layout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE; + } + + /** * Method that converts a rect from a vertex data * * @param vertex The vertex array |