Skip to content

Commit 935e440

Browse files
committed
use FatalDialog
1 parent 4e44374 commit 935e440

1 file changed

Lines changed: 7 additions & 20 deletions

File tree

cSploit/src/org/csploit/android/core/System.java

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import org.acra.ACRAConfiguration;
4444
import org.csploit.android.R;
4545
import org.csploit.android.WifiScannerActivity;
46+
import org.csploit.android.gui.dialogs.FatalDialog;
4647
import org.csploit.android.net.Endpoint;
4748
import org.csploit.android.net.Network;
4849
import org.csploit.android.net.Network.Protocol;
@@ -366,29 +367,15 @@ public static void reloadNetworkMapping(){
366367

367368
public static boolean checkNetworking(final Activity current){
368369
if(!Network.isWifiConnected(mContext)){
369-
AlertDialog.Builder builder = new AlertDialog.Builder(current);
370370

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);
378374

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);
381377

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();
392379

393380
return false;
394381
}

0 commit comments

Comments
 (0)