NFC integration

Source: Trusted_NFC_Device_Host_AA03.01e02_google.zip code drop (23-Sep-2010)

Conflicts:

	core/java/android/app/ApplicationContext.java
	core/java/android/provider/Settings.java
	core/jni/Android.mk
	core/jni/AndroidRuntime.cpp
	core/res/AndroidManifest.xml
	include/utils/Asset.h

Change-Id: I62c92f4c79f5ee65126c97602f6bc1c15794e573
Signed-off-by: Nick Pelly <npelly@google.com>
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 68a5a14..b9eb5d6 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -86,6 +86,10 @@
     <protected-broadcast android:name="android.hardware.action.USB_DISCONNECTED" />
     <protected-broadcast android:name="android.hardware.action.USB_STATE" />
 
+    <protected-broadcast android:name="com.trustedlogic.trustednfc.android.action.NDEF_TAG_DISCOVERED" />
+    <protected-broadcast android:name="com.trustedlogic.trustednfc.android.action.TRANSACTION_DETECTED" />
+    <protected-broadcast android:name="com.trustedlogic.trustednfc.android.action.LLCP_LINK_STATE_CHANGED" />
+
     <!-- ====================================== -->
     <!-- Permissions for things that cost money -->
     <!-- ====================================== -->
@@ -336,6 +340,30 @@
         android:description="@string/permdesc_bluetooth"
         android:label="@string/permlab_bluetooth" />
 
+    <!-- Allows applications to access remote NFC devices
+         @hide -->
+    <permission android:name="com.trustedlogic.trustednfc.permission.NFC_RAW"
+        android:permissionGroup="android.permission-group.NETWORK"
+        android:protectionLevel="dangerous"
+        android:description="@string/permdesc_nfcRaw"
+        android:label="@string/permlab_nfcRaw" />
+
+    <!-- Allows applications to be notified of remote NFC devices
+         @hide -->
+    <permission android:name="com.trustedlogic.trustednfc.permission.NFC_NOTIFY"
+        android:permissionGroup="android.permission-group.NETWORK"
+        android:protectionLevel="dangerous"
+        android:description="@string/permdesc_nfcNotify"
+        android:label="@string/permlab_nfcNotify" />
+
+    <!-- Allows applications to be notified of remote NFC LLCP devices
+         @hide -->
+    <permission android:name="com.trustedlogic.trustednfc.permission.NFC_LLCP"
+        android:permissionGroup="android.permission-group.NETWORK"
+        android:protectionLevel="dangerous"
+        android:description="@string/permdesc_nfcLlcp"
+        android:label="@string/permlab_nfcLlcp" />
+
     <!-- Allows applications to call into AccountAuthenticators. Only
     the system can get this permission. -->
     <permission android:name="android.permission.ACCOUNT_MANAGER"
@@ -839,6 +867,14 @@
         android:description="@string/permdesc_bluetoothAdmin"
         android:label="@string/permlab_bluetoothAdmin" />
 
+    <!-- Allows applications to change NFC connectivity settings 
+         @hide -->
+    <permission android:name="com.trustedlogic.trustednfc.permission.NFC_ADMIN"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:protectionLevel="dangerous"
+        android:description="@string/permdesc_nfcAdmin"
+        android:label="@string/permlab_nfcAdmin" />
+
     <!-- Allows an application to clear the caches of all installed
          applications on the device.  -->
     <permission android:name="android.permission.CLEAR_APP_CACHE"