packages/apps/Settings
リビジョン | 2e75203a6ecb81725b68bced6c5f8d5be37365f1 (tree) |
---|---|
日時 | 2015-02-03 06:39:57 |
作者 | Andres Morales <anmorales@goog...> |
コミッター | Andres Morales |
Use getDefaultAdapter instead of getNfcAdapter
getNfcAdapter can throw an exception if NFC is not
available
Bug: 19227597
Change-Id: Ib95849057938066dc5760a34f16333f5423ce61f
@@ -519,8 +519,7 @@ public class WifiSettings extends RestrictedSettingsFragment | ||
519 | 519 | } |
520 | 520 | if (mSelectedAccessPoint.networkId != INVALID_NETWORK_ID) { |
521 | 521 | menu.add(Menu.NONE, MENU_ID_MODIFY, 0, R.string.wifi_menu_modify); |
522 | - | |
523 | - NfcAdapter nfcAdapter = NfcAdapter.getNfcAdapter(getActivity()); | |
522 | + NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(getActivity()); | |
524 | 523 | if (nfcAdapter != null && nfcAdapter.isEnabled() && |
525 | 524 | mSelectedAccessPoint.security != AccessPoint.SECURITY_NONE) { |
526 | 525 | // Only allow writing of NFC tags for password-protected networks. |