cleanup workflow
[YkNeoCR.git] / src / org / average / nfcauthcr / Enroll.java
index 5b125fa490a3d4cb01527eb2a48a576530ba3171..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) {