Skip to content

Commit b00de95

Browse files
author
sds100
committed
SystemActionUtils: don't show NFC actions on devices without NFC
1 parent f50547e commit b00de95

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/io/github/sds100/keymapper/util/SystemActionUtils.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,24 +464,26 @@ object SystemActionUtils {
464464
),
465465

466466
//NFC
467-
468467
SystemActionDef(
469468
id = ENABLE_NFC,
470469
category = CATEGORY_NFC,
471470
iconRes = R.drawable.ic_outline_nfc_24px,
472471
permission = Constants.PERMISSION_ROOT,
472+
feature = PackageManager.FEATURE_NFC,
473473
descriptionRes = R.string.action_nfc_enable
474474
),
475475
SystemActionDef(
476476
id = DISABLE_NFC,
477477
category = CATEGORY_NFC,
478+
feature = PackageManager.FEATURE_NFC,
478479
iconRes = R.drawable.ic_nfc_off,
479480
permission = Constants.PERMISSION_ROOT,
480481
descriptionRes = R.string.action_nfc_disable
481482
),
482483
SystemActionDef(
483484
id = TOGGLE_NFC,
484485
category = CATEGORY_NFC,
486+
feature = PackageManager.FEATURE_NFC,
485487
iconRes = R.drawable.ic_outline_nfc_24px,
486488
permission = Constants.PERMISSION_ROOT,
487489
descriptionRes = R.string.action_nfc_toggle

0 commit comments

Comments
 (0)