@JavascriptInterface
                public void notice(String info) {
                    if (mainThreadHandler != null) {
                        Message msg = mainThreadHandler.obtainMessage(HANDLE_MESSAGE, info);
                        mainThreadHandler.sendMessage(msg);
                    }
                }
set a listener for javascript closing the current activity.
app/src/main/java/com/example/jingbin/webviewstudy/view/WVJBWebView.java