OSDN Git Service

Fixes Settings app crashing when NfcAdapter is null
authorRuchi Kandoi <kandoiruchi@google.com>
Wed, 1 Aug 2018 20:30:35 +0000 (13:30 -0700)
committerRuchi Kandoi <kandoiruchi@google.com>
Wed, 1 Aug 2018 20:35:18 +0000 (13:35 -0700)
commit37efa64d63c3d24170a4deca4eb407f4517edfe1
tree9a13495baf756519d15a8be232f14a971f3203cd
parentd22671aed1ce4369d83da1aa31f450c400ca07f8
Fixes Settings app crashing when NfcAdapter is null

If a device doesn't support NFC then
android.settings.NFCSHARING_SETTINGS and
android.nfc.cardemulation.action.ACTION_CHANGE_DEFAULT intents shouldn't
do anything and gracefully exit.

Test: Manual; Emulate a non-NFC device and test with apks sending intents
Bug: 80094104
Bug: 80092438
Change-Id: I5b3c3fdd582679e2cb16f474ef3331bc246b0d42
src/com/android/settings/nfc/AndroidBeam.java
src/com/android/settings/nfc/PaymentDefaultDialog.java