diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-02 22:19:41 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-06-03 01:08:32 +0200 |
commit | b3ebb646663f166c6dd2c7d2cfbc47293582b33e (patch) | |
tree | fa81a867f9d7b719e801eb98b4b0c9e0a4de2096 /OpenKeychain/src/main/java/org | |
parent | e2988c2a68116d7adcc6e765cb307c451bebbe78 (diff) | |
download | open-keychain-b3ebb646663f166c6dd2c7d2cfbc47293582b33e.tar.gz open-keychain-b3ebb646663f166c6dd2c7d2cfbc47293582b33e.tar.bz2 open-keychain-b3ebb646663f166c6dd2c7d2cfbc47293582b33e.zip |
hide invoke nfc button in android < 5
Diffstat (limited to 'OpenKeychain/src/main/java/org')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvShareFragment.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvShareFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvShareFragment.java index 479ddae0b..42abf35eb 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvShareFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvShareFragment.java @@ -140,12 +140,17 @@ public class ViewKeyAdvShareFragment extends LoaderFragment implements } }); - mKeyNfcButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - mNfcHelper.invokeNfcBeam(); - } - }); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + mKeyNfcButton.setVisibility(View.VISIBLE); + mKeyNfcButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + mNfcHelper.invokeNfcBeam(); + } + }); + } else { + mKeyNfcButton.setVisibility(View.GONE); + } mKeySafeSlingerButton.setOnClickListener(new View.OnClickListener() { @Override |