Unify and refactor how we get and use platform info
Merge pull request #1672 from ussuri/refactor-PlatformInfo

Unify and refactor the way we get and use platform info