Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1876583b authored by Tucker Sylvestro's avatar Tucker Sylvestro
Browse files

svc nfc should support watches too

Check for both FEATURE_NFC and FEATURE_NFC_HOST_CARD_EMULATION in the
"svc nfc" command.  Watches may only have the latter, but should still
support the nfc enable/disable command.

See b/24532713#comment7 for context.

Bug 32386425

Change-Id: I307798f00728c6b437aebfcf58115af7265e3692
parent df459cb2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -58,7 +58,8 @@ public class NfcCommand extends Svc.Command {
                IPackageManager pm = IPackageManager.Stub.asInterface(
                        ServiceManager.getService("package"));
                try {
                    if (pm.hasSystemFeature(PackageManager.FEATURE_NFC, 0)) {
                    if (pm.hasSystemFeature(PackageManager.FEATURE_NFC, 0) ||
			pm.hasSystemFeature(PackageManager.FEATURE_NFC_HOST_CARD_EMULATION, 0)) {
                        INfcAdapter nfc = INfcAdapter.Stub
                                .asInterface(ServiceManager.getService(Context.NFC_SERVICE));
                        try {