X-Git-Url: http://www.average.org/gitweb/?p=YkNeoCR.git;a=blobdiff_plain;f=src%2Forg%2Faverage%2Fnfcauthcr%2FCheck.java;h=6b6ec4f568f79e043ea47cef0888432bb38257b4;hp=1fc5ceaf00f36d497b5cae113390f2361d4d7bf6;hb=bb4b51c880cf9a1942151bf1dd8977e3a8e0ccf6;hpb=28b4d52dc728ff9016890ff3630d1237f1f2650b diff --git a/src/org/average/nfcauthcr/Check.java b/src/org/average/nfcauthcr/Check.java index 1fc5cea..6b6ec4f 100644 --- a/src/org/average/nfcauthcr/Check.java +++ b/src/org/average/nfcauthcr/Check.java @@ -20,7 +20,6 @@ public class Check extends Activity { private final String TAG = getClass().getName(); - private AlertDialog swipeDialog; private PendingIntent tagIntent; @Override @@ -30,14 +29,8 @@ public class Check extends Activity { Intent intent = getIntent(); setResult(RESULT_CANCELED); - if (swipeDialog != null) { - swipeDialog.dismiss(); - swipeDialog = null; - } int slot = intent.getIntExtra("slot", -1); if (slot > 0) { - swipeDialog = makeDialog(); - swipeDialog.show(); enableDispatch(slot); } } @@ -47,10 +40,6 @@ public class Check extends Activity { super.onPause(); Log.v(TAG, "Finished the work"); - if(swipeDialog != null) { - swipeDialog.dismiss(); - swipeDialog = null; - } disableDispatch(); } @@ -76,18 +65,26 @@ public class Check extends Activity { finish(); } - private AlertDialog makeDialog() { - AlertDialog.Builder builder = new AlertDialog.Builder(this); - builder.setTitle(R.string.challenging); - builder.setMessage(R.string.swipe); - builder.setOnCancelListener( - new DialogInterface.OnCancelListener() { - public void onCancel(DialogInterface dialog) { - finish(); - } - }); - return builder.create(); - } +/* + + + + + + + + + + + + android.nfc.tech.IsoDep + + + +*/ private void enableDispatch(int slot) { Intent intent = getIntent(); @@ -101,13 +98,11 @@ public class Check extends Activity { Toast.makeText(this, R.string.no_nfc, Toast.LENGTH_LONG).show(); finish(); - return; } if (! adapter.isEnabled()) { Toast.makeText(this, R.string.nfc_disabled, Toast.LENGTH_LONG).show(); finish(); - return; } adapter.enableForegroundDispatch( this, tagIntent, new IntentFilter[] {iso},