]> www.average.org Git - YkNeoCR.git/blobdiff - src/org/average/nfcauthcr/Enroll.java
reorg, separate roles
[YkNeoCR.git] / src / org / average / nfcauthcr / Enroll.java
index 12533e7bf8c469fb9bd719696d5215fa898b3826..6c104c4ad9513ad22574924fccd89f824a17d033 100644 (file)
@@ -24,7 +24,6 @@ public class Enroll extends Activity {
        private static boolean waitingForResult = false;
        private static SharedPreferences prefs;
        private static int slot;
-       private AlertDialog swipeDialog;
 
        @Override
        protected void onCreate(Bundle savedInstanceState)
@@ -53,8 +52,6 @@ public class Enroll extends Activity {
        @Override
        protected void onPause() {
                super.onPause();
-               Log.v(TAG, "Going inactive, try to stop");
-               if (!waitingForResult) { finish(); }
        }
 
        @Override
@@ -89,10 +86,6 @@ public class Enroll extends Activity {
                                        Intent intent) {
                Log.v(TAG, "Got activity result");
                waitingForResult = false;
-               if(swipeDialog != null) {
-                       swipeDialog.dismiss();
-                       swipeDialog = null;
-               }
 
                if (resultCode != RESULT_OK) {
                        Log.v(TAG, "Error result code " + resultCode);
@@ -131,26 +124,10 @@ public class Enroll extends Activity {
                rng.nextBytes(challenge);
                Log.v(TAG, "Random challenge: " + hex(challenge));
                Intent crIntent = new Intent(this, TagEvent.class);
-               crIntent.putExtra("slot", slot);
+               crIntent.putExtra("yubikey_neo_slot", slot);
                crIntent.putExtra("challenge", challenge);
-               this.startActivityForResult(crIntent, 0);
                waitingForResult = true;
-               if (swipeDialog != null) swipeDialog.dismiss();
-               swipeDialog = makeDialog();
-               swipeDialog.show();
-       }
-
-       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) {
-                               Log.v(TAG, "unbind service FIXME");
-                       }
-               });
-               return builder.create();
+               this.startActivityForResult(crIntent, 0);
        }
 
        private String hex(byte[] a) {