]> www.average.org Git - YkNeoCR.git/blobdiff - src/org/average/nfcauthcr/Enroll.java
Revert "Merge branch 'master' of ssh://git.average.org/~/NFCAuthCR"
[YkNeoCR.git] / src / org / average / nfcauthcr / Enroll.java
index 9f9d53593da811965c43d9c4ef4167826f35da07..190c08ff921c190b65754e5d3b01eb4ae9f5c331 100644 (file)
@@ -80,7 +80,7 @@ public class Enroll extends Activity {
                if (slot > 0) {
                        runEnrollment(slot);
                } else {
-                       showEnrollResult("Must specify which slot to use");
+                       showEnrollResult(R.string.need_slot);
                }
        }
 
@@ -101,15 +101,14 @@ public class Enroll extends Activity {
                editor.putString("challenge", hex(challenge));
                editor.putString("response", hex(response));
                editor.commit();
+               showEnrollResult(R.string.enroll_success);
                Log.v(TAG, "stored new challenge and response");
        }
 
-       private void showEnrollResult(final String msg) {
-               Log.v(TAG, "Show result: \"" + msg + "\"");
-
+       private void showEnrollResult(int messageid) {
                AlertDialog.Builder builder = new AlertDialog.Builder(this);
                builder.setTitle(R.string.enrollresult);
-               builder.setMessage(msg);
+               builder.setMessage(messageid);
                builder.setPositiveButton(android.R.string.ok,
                                new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int which) {
@@ -127,7 +126,7 @@ public class Enroll extends Activity {
                rng.nextBytes(challenge);
                Log.v(TAG, "Random challenge: " + hex(challenge));
                Log.v(TAG, "Launching challenging activity");
-               Intent crIntent = new Intent(this, NFCAuthCRCheck.class);
+               Intent crIntent = new Intent(this, Check.class);
                crIntent.putExtra("slot", slot);
                crIntent.putExtra("challenge", challenge);
                this.startActivityForResult(crIntent, 0);