@@ -28,7 +28,7 @@ public class WebViewJavascriptBridge {
2828 Map <String ,WVJBHandler > _messageHandlers ;
2929 Map <String ,WVJBResponseCallback > _responseCallbacks ;
3030 long _uniqueId ;
31- BlockingQueue <String > _messageQueue ;
31+ // BlockingQueue<String> _messageQueue;
3232
3333 public WebViewJavascriptBridge (Context context ,WebView webview ,WVJBHandler handler ) {
3434 this .mContext =context ;
@@ -37,7 +37,7 @@ public WebViewJavascriptBridge(Context context,WebView webview,WVJBHandler handl
3737 _messageHandlers =new HashMap <String ,WVJBHandler >();
3838 _responseCallbacks =new HashMap <String , WVJBResponseCallback >();
3939 _uniqueId =0 ;
40- _messageQueue =new LinkedBlockingQueue <String >();
40+ // _messageQueue=new LinkedBlockingQueue<String>();
4141 WebSettings webSettings = mWebView .getSettings ();
4242 webSettings .setJavaScriptEnabled (true );
4343 mWebView .addJavascriptInterface (this , "_WebViewJavascriptBridge" );
@@ -166,9 +166,9 @@ private void _sendData(String data,WVJBResponseCallback responseCallback,String
166166 if (null !=handlerName ) {
167167 message .put ("handlerName" , handlerName );
168168 }
169- _queueMessage (message );
169+ _dispatchMessage (message );
170170 }
171-
171+ /*
172172 private void _queueMessage(Map<String, String> message) {
173173 String messageJSON = new JSONObject(message).toString();
174174 try {
@@ -190,7 +190,7 @@ private void _notifyNewMessage() {
190190 "javascript:WebViewJavascriptBridge._getNewMessageFromJava();";
191191 mWebView.loadUrl(javascriptCommand);
192192 }
193-
193+ */
194194 private void _dispatchMessage (Map <String , String > message ){
195195 String messageJSON = new JSONObject (message ).toString ();
196196 Log .d ("test" ,"sending:" +messageJSON );
0 commit comments