commit | 8a5d335a5533eef89aa8e4b701b692673145eef1 | [log] [tgz] |
---|---|---|
author | Patrick Scott <phanna@android.com> | Wed Aug 18 11:00:42 2010 -0400 |
committer | Patrick Scott <phanna@android.com> | Wed Aug 18 11:00:42 2010 -0400 |
tree | a50e1f09d0b211b818281c3d9ef613c9321e36b9 | |
parent | 7eb84256e57ce85bece610e6a01e20fa12e0f3fe [diff] |
Use a static variable and methods for the current WebView. sJavaBridge may not exist by the time onWindowFocusChanged is called. To avoid an NPE, just static methods that modify a global field. JWebCoreJavaBridge is a global object anyway so using a static field will be fine. To avoid any garbage collection issues, store the WebView in a WeakReference. Bug: 2894682 Change-Id: I73de9237ddbbdc55841a9b2639437e26856439c8