+ if (dpi > 0 && maxdimension > 0)
+ {
+ scale = Math.min(dpi / hidpiThreshold,
+ maxdimension / tallScreenThreshold) + 1;
+ }
+ else if (dpi == 0 && maxdimension > tallScreenThreshold)
+ {
+ // dpi couldn't be found but the screen has a large vertical pixel count
+ scale = maxdimension / tallScreenThreshold + 1;
+ }
+ /* do nothing if maxdimension == 0 -- might be just a small HD screen (e.g. Gemini PDA)
+ else if (maxdimension == 0 && dpi > hidpiThreshold)
+ {
+ }
+ */