Get display id from display instead of the display of root view

Since `getRootView()` will increase the execution time, use
`getDisplay()` instead.

Bug: 202825727
Test: manually
Change-Id: I22ef58cb39716433cd8e91200837ab49229ae3e1
(cherry picked from commit 6a06d8615f24769381e340a544c71d56a79ff25c)
1 file changed