commit | 5e2dd4f69f3bb4399ca654e65c4ccb7aab06480d | [log] [tgz] |
---|---|---|
author | Erdi Chen <erdi@google.com> | Thu Sep 01 15:06:56 2011 -0700 |
committer | Jason Bayer <bayer@google.com> | Thu Sep 01 18:08:03 2011 -0700 |
tree | 4f8faf9cc97d6763dba228ece3e42883b60f1e96 | |
parent | ccb3f4648473f4101be79ec573fbaa7a25cdcad7 [diff] |
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