Merge "Using the WindowMetrics API instead of display.getRealSize" into tm-dev