Commit 5e2dd4f6 authored by Erdi Chen's avatar Erdi Chen Committed by Jason Bayer
Browse files

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
parent ccb3f464
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment