FIX Null Pointer Exception on dialog cancel

Null Pointer Exception occurs because mWebViewCore instance
is made to null while calling destroyJava(). When
1.webview hosting activity goest to background, without calling webview onPause().
2. If app is launched again (having launchmode:singletask ) and another activity (not  webview hosting) comes on top top.
3. It destorys the previous activity holding webview which internally tries to cancel the dialog, but webviewcore instance is null.
Null pointer exception is raised.

Change-Id: Idbcd30d0b0d4a35819444bbaa5c73cced8bb35a3
Signed-off-by: Amit Kumar <amitkecian@gmail.com>
InputMethodService: Auto Keyboard Rotation (1/2)

Force auto-rotate when keyboard is shown.
Configurable auto-rotate sensor timeout after keyboard is hidden.

Change-Id: I56bc333e91702a9227409e35fce28567c435d16c
latest goods

Merge branch 'jb-mr1' of git://github.com/Root-Box/frameworks_base into rb