slightly better ui messages
This commit is contained in:
@@ -105,7 +105,6 @@ public class MainActivity extends Activity {
|
||||
private EditText editTextVPCDHost;
|
||||
private EditText editTextVPCDPort;
|
||||
private TextView textViewVPCDStatus;
|
||||
private TextView textViewInfo;
|
||||
private Button button;
|
||||
private ProgressBar spinner;
|
||||
private VPCDHandler handler;
|
||||
@@ -119,7 +118,6 @@ public class MainActivity extends Activity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
textViewInfo = (TextView) findViewById(R.id.textViewInfo);
|
||||
editTextVPCDHost = (EditText) findViewById(R.id.editTextHostname);
|
||||
editTextVPCDPort = (EditText) findViewById(R.id.editTextPort);
|
||||
textViewVPCDStatus = (TextView) findViewById(R.id.textViewLog);
|
||||
@@ -169,7 +167,6 @@ public class MainActivity extends Activity {
|
||||
vpcdDisconnect();
|
||||
}
|
||||
|
||||
|
||||
public void buttonOnClickDisConnect(View view) {
|
||||
if (testing) {
|
||||
testing = false;
|
||||
|
||||
@@ -89,6 +89,7 @@ public class VPCDWorker implements Runnable, Closeable {
|
||||
case VPCD_CTRL_ON:
|
||||
reader.powerOn();
|
||||
messageSender.sendOn();
|
||||
messageSender.sendATR(Hex.getHexString(reader.getATR()));
|
||||
break;
|
||||
case VPCD_CTRL_RESET:
|
||||
reader.reset();
|
||||
@@ -96,7 +97,6 @@ public class VPCDWorker implements Runnable, Closeable {
|
||||
break;
|
||||
case VPCD_CTRL_ATR:
|
||||
out = reader.getATR();
|
||||
//messageSender.sendATR(Hex.getHexString(out));
|
||||
break;
|
||||
default:
|
||||
throw new IOException("Unhandled command from VPCD.");
|
||||
@@ -114,8 +114,6 @@ public class VPCDWorker implements Runnable, Closeable {
|
||||
if (doRun) {
|
||||
e.printStackTrace();
|
||||
messageSender.sendError(e.getMessage());
|
||||
} else {
|
||||
messageSender.sendDisconnected("");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -167,8 +165,12 @@ public class VPCDWorker implements Runnable, Closeable {
|
||||
}
|
||||
|
||||
private void vpcdDisconnect() throws IOException {
|
||||
if (reader != null) {
|
||||
reader.eject();
|
||||
}
|
||||
if (socket != null) {
|
||||
socket.close();
|
||||
messageSender.sendDisconnected("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,23 +9,21 @@
|
||||
<string name="hint_vpcd_port">port</string>
|
||||
<string name="hint_vpcd_hostname">VPCD hostname</string>
|
||||
|
||||
<string name="vpcd_config_info">Settings for <a href="http://frankmorgner.github.io/vsmartcard/virtualsmartcard/README.html">remote smart card reader driver (VPCD)</a> of the host computer.</string>
|
||||
<string name="vpcd_config_info">Settings for <a href="http://frankmorgner.github.io/vsmartcard/virtualsmartcard/README.html">remote smart card reader driver (VPCD)</a> of the host computer. Tap a contact-less card when configured.</string>
|
||||
|
||||
<string name="status_error">Error</string>
|
||||
<string name="status_disconnected">Disconnected</string>
|
||||
<string name="status_disconnected">Disconnected from VPCD</string>
|
||||
<string name="status_connected_to">Connected to</string>
|
||||
<string name="status_atr">ATR</string>
|
||||
<string name="status_capdu">C-APDU</string>
|
||||
<string name="status_rapdu">R-APDU</string>
|
||||
<string name="status_on">On</string>
|
||||
<string name="status_off">Off</string>
|
||||
<string name="status_reset">Reset</string>
|
||||
<string name="status_unknown">Unknown Event</string>
|
||||
<string name="status_tag_discovered">Contact-less card discovered.</string>
|
||||
<string name="status_dummy_start">Using a dummy card to test the connection.</string>
|
||||
<string name="status_default_port">Using default port.</string>
|
||||
|
||||
<string name="menu_copy_to_clipboard">Copy</string>
|
||||
<string name="status_on">Powered up the card</string>
|
||||
<string name="status_off">Powered down the card (cold reset)</string>
|
||||
<string name="status_reset">Resetted the card (warm reset)</string>
|
||||
<string name="status_unknown">Unable to perform unknown Event</string>
|
||||
<string name="status_tag_discovered">Contact-less card discovered</string>
|
||||
<string name="status_dummy_start">Using a dummy card to test the connection</string>
|
||||
<string name="status_default_port">Using default port</string>
|
||||
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="verbose">Verbose logging</string>
|
||||
|
||||
Reference in New Issue
Block a user