Skip to content

Commit

Permalink
Only show "press button" message when using USB
Browse files Browse the repository at this point in the history
  • Loading branch information
pp3345 committed Jun 12, 2018
1 parent cb39a50 commit db9a01f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import android.widget.TextView;

import net.pp3345.ykdroid.yubikey.Slot;
import net.pp3345.ykdroid.yubikey.UsbYubiKey;

/**
* May be invoked by Android apps using the
Expand Down Expand Up @@ -61,7 +62,8 @@ protected void onCreate(final Bundle savedInstanceState) {

@Override
public void onYubiKeyConnected(final YubiKey yubiKey) {
((TextView) this.findViewById(R.id.info)).setText(R.string.press_button);
if (yubiKey instanceof UsbYubiKey)
((TextView) this.findViewById(R.id.info)).setText(R.string.press_button);
this.findViewById(R.id.slotSelection).setVisibility(View.GONE);

@SuppressLint("StaticFieldLeak") // Leaks can't occur as the task will eventually timeout
Expand Down

0 comments on commit db9a01f

Please sign in to comment.