@@ -276,15 +276,15 @@ public static boolean checkConnection(Context context){
276276
277277
278278
279- public static void showCaptchaPopup (Context context , int code , Exception e , boolean force_close , Fragment fragment , Preference p ){
279+ public static void showCaptchaPopup (String url , Context context , int code , Exception e , boolean force_close , Fragment fragment , Preference p ){
280280 if (context != null ) {
281281 if (!checkConnection (context )) {
282282 //no internet
283283 //showErrorPopup(context, "네트워크 연결이 없습니다.", e, force_close);
284284 Toast .makeText (context , "네트워크 연결이 없습니다." , Toast .LENGTH_LONG ).show ();
285285 if (force_close ) ((Activity ) context ).finish ();
286286 } else if (captchaCount == 0 ) {
287- startCaptchaActivity (context , code , fragment );
287+ startCaptchaActivity (context , code , fragment , url );
288288 } else {
289289 AlertDialog .Builder builder ;
290290 String title = "오류" ;
@@ -297,7 +297,7 @@ public static void showCaptchaPopup(Context context, int code, Exception e, bool
297297 .setNeutralButton ("확인" , (dialogInterface , i ) -> {
298298 if (force_close ) ((Activity ) context ).finish ();
299299 })
300- .setPositiveButton ("CAPTCHA 인증" , (dialog , which ) -> startCaptchaActivity (context , code , fragment ))
300+ .setPositiveButton ("CAPTCHA 인증" , (dialog , which ) -> startCaptchaActivity (context , code , fragment , url ))
301301 .setNegativeButton ("URL 설정" , (dialogInterface , i ) -> urlSettingPopup (context , p ))
302302 .setOnCancelListener (dialogInterface -> {
303303 if (force_close ) ((Activity ) context ).finish ();
@@ -315,6 +315,16 @@ public static void showCaptchaPopup(Context context, int code, Exception e, bool
315315 }
316316 }
317317
318+ static void startCaptchaActivity (Context context , int code , Fragment fragment , String url ){
319+ Intent captchaIntent = new Intent (context , CaptchaActivity .class );
320+ System .out .println ("ppppsend " + url );
321+ captchaIntent .putExtra ("url" , url );
322+ if (fragment == null )
323+ ((Activity )context ).startActivityForResult (captchaIntent , code );
324+ else
325+ fragment .startActivityForResult (captchaIntent , code );
326+ }
327+
318328 static void startCaptchaActivity (Context context , int code , Fragment fragment ){
319329 Intent captchaIntent = new Intent (context , CaptchaActivity .class );
320330 if (fragment == null )
@@ -323,30 +333,40 @@ static void startCaptchaActivity(Context context, int code, Fragment fragment){
323333 fragment .startActivityForResult (captchaIntent , code );
324334 }
325335
326- public static void showCaptchaPopup (Context context , int code , Exception e , boolean force_close , Preference p ) {
327- showCaptchaPopup (context ,code ,e ,force_close ,null , p );
336+ public static void showCaptchaPopup (String url , Context context , int code , Exception e , boolean force_close , Preference p ) {
337+ showCaptchaPopup (url , context ,code ,e ,force_close ,null , p );
328338 }
329339
330- public static void showCaptchaPopup (Context context , Exception e , Preference p ) {
340+ public static void showCaptchaPopup (String url , Context context , Exception e , Preference p ) {
331341 // viewer call
332- showCaptchaPopup (context , REQUEST_CAPTCHA , e , true , p );
342+ showCaptchaPopup (url , context , REQUEST_CAPTCHA , e , true , p );
333343 }
334344
335- public static void showCaptchaPopup (Context context , int code , Preference p ){
345+ public static void showCaptchaPopup (String url , Context context , int code , Preference p ){
336346 // menu call
337- showCaptchaPopup (context , code , null , false , p );
347+ showCaptchaPopup (url , context , code , null , false , p );
348+ }
349+
350+ public static void showCaptchaPopup (String url , Context context , int code , Fragment fragment , Preference p ){
351+ // menu call
352+ showCaptchaPopup (url , context , code , null , false , fragment , p );
338353 }
339354
340355 public static void showCaptchaPopup (Context context , int code , Fragment fragment , Preference p ){
341356 // menu call
342- showCaptchaPopup (context , code , null , false , fragment , p );
357+ showCaptchaPopup (null , context , code , null , false , fragment , p );
343358 }
344359
360+ public static void showCaptchaPopup (String url , Context context , Preference p ){
361+ // viewer call
362+ showCaptchaPopup (url , context , 0 , null , true , p );
363+ }
345364 public static void showCaptchaPopup (Context context , Preference p ){
346365 // viewer call
347- showCaptchaPopup (context , 0 , null , true , p );
366+ showCaptchaPopup (null , context , 0 , null , true , p );
348367 }
349368
369+
350370 public static void showTokiCaptchaPopup (Context context , Preference p ){
351371 AlertDialog .Builder builder ;
352372 String title = "캡차 인증" ;
0 commit comments