commit | 9c8e6855ad9ff2cf4622df292a1266f633391e12 | [log] [tgz] |
---|---|---|
author | Mohamed Heikal <mheikal@google.com> | Tue Jun 19 22:12:39 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Jun 19 22:12:39 2018 |
tree | 13b3f6fa6280e8cabe136876cf0546564a844bfa | |
parent | 8d29f7111e9dbeb57e64c36d30045c0aaeb1d7f4 [diff] |
[Android] Fix NPE if onTrimMemory called before UI inflation completed onTrimMemory tries to get a reference to the ControlContainer view and calls getToolbarResourceAdapter().dropCachedBitmap() on it. If the UI has not finished inflation yet, then the findViewById(R.id.control_container) returns null causing a crash. This cl adds a null check before calling methods on the ControlContainer. Bug: 853682 Change-Id: I621d21a92509c0c3211da99841cd59991cb38813 Reviewed-on: https://chromium-review.googlesource.com/1106900 Reviewed-by: Yaron Friedman <yfriedman@chromium.org> Commit-Queue: Mohamed Heikal <mheikal@chromium.org> Cr-Commit-Position: refs/heads/master@{#568616}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .