According to the behavior of Adobe AIR and Adobe Flash Player,
openfl.system.Capabilities.screenDPI uses DPI levels, to roughly estimate the density you might want to apply to your UI.
lime.system.Display.dpi gives the most accurate calculation we can of the exact display density. This may or may not be what a user is expecting in terms of UI scale. On the desktop, users with higher resolution screens may expect things to look smaller, for example, and not to be a consistent real-world size.
Both are available, based on whatever you find more useful