public boolean onJsConfirm( WebView paramWebView, String paramString1, String paramString2, final JsResult paramJsResult) { paramWebView = new AlertDialog.Builder(cordova.getActivity()); paramWebView.setMessage(paramString2); paramWebView.setTitle("Confirm"); paramWebView.setCancelable(true); paramWebView.setPositiveButton( 17039370, new DialogInterface.OnClickListener() { public void onClick( DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt) { paramJsResult.confirm(); } }); paramWebView.setNegativeButton( 17039360, new DialogInterface.OnClickListener() { public void onClick( DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt) { paramJsResult.cancel(); } }); paramWebView.setOnCancelListener( new DialogInterface.OnCancelListener() { public void onCancel(DialogInterface paramAnonymousDialogInterface) { paramJsResult.cancel(); } }); paramWebView.setOnKeyListener( new DialogInterface.OnKeyListener() { public boolean onKey( DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt, KeyEvent paramAnonymousKeyEvent) { if (paramAnonymousInt == 4) { paramJsResult.cancel(); return false; } return true; } }); paramWebView.show(); return true; }
public boolean onJsPrompt( WebView paramWebView, final String paramString1, String paramString2, String paramString3, final JsPromptResult paramJsPromptResult) { paramWebView = appView.bridge.promptOnJsPrompt(paramString1, paramString2, paramString3); if (paramWebView != null) { paramJsPromptResult.confirm(paramWebView); } for (; ; ) { return true; paramWebView = new AlertDialog.Builder(cordova.getActivity()); paramWebView.setMessage(paramString2); paramString1 = new EditText(cordova.getActivity()); if (paramString3 != null) { paramString1.setText(paramString3); } paramWebView.setView(paramString1); paramWebView.setCancelable(false); paramWebView.setPositiveButton( 17039370, new DialogInterface.OnClickListener() { public void onClick( DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt) { paramAnonymousDialogInterface = paramString1.getText().toString(); paramJsPromptResult.confirm(paramAnonymousDialogInterface); } }); paramWebView.setNegativeButton( 17039360, new DialogInterface.OnClickListener() { public void onClick( DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt) { paramJsPromptResult.cancel(); } }); paramWebView.show(); } }