Use float compare with delta to account for integer rounding error.
densityDpi is calculated with padding of 0.5f, so there is possible rounding error when the calculation is reversed for comparison to the float version of density. densityDpi = (int)((density*DisplayMetrics.DENSITY_DEFAULT)+.5f) Change-Id: I16ef30548ed5078c0611448f3b37d7679a096eb3
Loading
Please sign in to comment