Use Diplay.getMetrics in DisplayController
- This is a workaround of b/163815566, where DisplayMetrics is stale when onDisplayChanged is called. - Instead of relying on stale DisplayConext, get the DisplayMetrics from the Display directly. - Also optimized how DisplayController.Info is created by passing in Display only - Use mDisplayContext.getDisplay directly if availalbe Bug: 163815566, 160544577 Test: DPI looks correct on device boot Change-Id: I2a7454bb8cf2073ce592e8662781b87fc998444f (cherry picked from commit 177c38243dc3bf245d1f7db3c265dfb56522f441)
Loading
Please register or sign in to comment