android: Use Context.getDisplay on R
Context.getDisplay is new on R and will throw an exception when the Context is not associated with a display. Use this exception to detect this case instead of trying to unwrap the context to find an Activity. Bug: 1116000 Change-Id: Ib900205b8ce8aceb21a9f705431e040aef0e6ddb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2354291 Commit-Queue: Bo <boliu@chromium.org> Reviewed-by:Theresa <twellington@chromium.org> Reviewed-by:
Andrew Grieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#797878}
Showing
Please register or sign in to comment