Make getSystemService(NFC_SERVICE) the NFC entry point.
This gives NFC service a handle to the application context. Deprecate NfcAdapter.getDefaultAdapter(), it does not provide a context. Using this method will print a warning, and will later throw an exception if a method that requires a context is called. No 2.3 API's will fail, but new API's that do require a context might fail. Also add helper NfcAdapter.getDefaultAdapter(Context). Change-Id: I9a6378de4ef4b61ad922f8d53e64e2a1a1d5d60c
This commit is contained in:
@ -35673,6 +35673,17 @@
|
||||
visibility="public"
|
||||
>
|
||||
</field>
|
||||
<field name="NFC_SERVICE"
|
||||
type="java.lang.String"
|
||||
transient="false"
|
||||
volatile="false"
|
||||
value=""nfc""
|
||||
static="true"
|
||||
final="true"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
</field>
|
||||
<field name="NOTIFICATION_SERVICE"
|
||||
type="java.lang.String"
|
||||
transient="false"
|
||||
@ -100183,6 +100194,19 @@
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
<parameter name="context" type="android.content.Context">
|
||||
</parameter>
|
||||
</method>
|
||||
<method name="getDefaultAdapter"
|
||||
return="android.nfc.NfcAdapter"
|
||||
abstract="false"
|
||||
native="false"
|
||||
synchronized="false"
|
||||
static="true"
|
||||
final="false"
|
||||
deprecated="deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
</method>
|
||||
<method name="isEnabled"
|
||||
return="boolean"
|
||||
@ -100229,6 +100253,26 @@
|
||||
>
|
||||
</field>
|
||||
</class>
|
||||
<class name="NfcManager"
|
||||
extends="java.lang.Object"
|
||||
abstract="false"
|
||||
static="false"
|
||||
final="true"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
<method name="getDefaultAdapter"
|
||||
return="android.nfc.NfcAdapter"
|
||||
abstract="false"
|
||||
native="false"
|
||||
synchronized="false"
|
||||
static="false"
|
||||
final="false"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
</method>
|
||||
</class>
|
||||
</package>
|
||||
<package name="android.opengl"
|
||||
>
|
||||
|
Reference in New Issue
Block a user