|
43 | 43 | import org.acra.ACRAConfiguration; |
44 | 44 | import org.csploit.android.R; |
45 | 45 | import org.csploit.android.WifiScannerActivity; |
| 46 | +import org.csploit.android.gui.dialogs.FatalDialog; |
46 | 47 | import org.csploit.android.net.Endpoint; |
47 | 48 | import org.csploit.android.net.Network; |
48 | 49 | import org.csploit.android.net.Network.Protocol; |
@@ -366,29 +367,15 @@ public static void reloadNetworkMapping(){ |
366 | 367 |
|
367 | 368 | public static boolean checkNetworking(final Activity current){ |
368 | 369 | if(!Network.isWifiConnected(mContext)){ |
369 | | - AlertDialog.Builder builder = new AlertDialog.Builder(current); |
370 | 370 |
|
371 | | - builder.setCancelable(false); |
372 | | - builder.setTitle(current.getString(R.string.error)); |
373 | | - builder.setMessage(current.getString(R.string.wifi_went_down)); |
374 | | - builder.setPositiveButton("Ok", new DialogInterface.OnClickListener(){ |
375 | | - @Override |
376 | | - public void onClick(DialogInterface dialog, int which){ |
377 | | - dialog.dismiss(); |
| 371 | + Intent intent = new Intent(); |
| 372 | + intent.putExtra(WifiScannerActivity.CONNECTED, false); |
| 373 | + current.setResult(Activity.RESULT_OK, intent); |
378 | 374 |
|
379 | | - Bundle bundle = new Bundle(); |
380 | | - bundle.putBoolean(WifiScannerActivity.CONNECTED, false); |
| 375 | + String title = current.getString(R.string.error); |
| 376 | + String message = current.getString(R.string.wifi_went_down); |
381 | 377 |
|
382 | | - Intent intent = new Intent(); |
383 | | - intent.putExtras(bundle); |
384 | | - |
385 | | - current.setResult(Activity.RESULT_OK, intent); |
386 | | - current.finish(); |
387 | | - } |
388 | | - }); |
389 | | - |
390 | | - AlertDialog alert = builder.create(); |
391 | | - alert.show(); |
| 378 | + new FatalDialog(title, message, current).show(); |
392 | 379 |
|
393 | 380 | return false; |
394 | 381 | } |
|
0 commit comments