List of usage examples for android.util DisplayMetrics DENSITY_DEVICE_STABLE
int DENSITY_DEVICE_STABLE
To view the source code for android.util DisplayMetrics DENSITY_DEVICE_STABLE.
Click Source Link
From source file:com.android.launcher3.Utilities.java
public static boolean getAllowRotationDefaultValue(Context context) { if (isNycOrAbove()) { // If the device was scaled, used the original dimensions to determine if rotation // is allowed of not. Resources res = context.getResources(); int originalSmallestWidth = res.getConfiguration().smallestScreenWidthDp * res.getDisplayMetrics().densityDpi / DisplayMetrics.DENSITY_DEVICE_STABLE; return originalSmallestWidth >= 600; }// w ww. j a va 2 s . c o m return false; }