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/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index a80ab1d..7f42429 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -19,6 +19,7 @@
import com.android.server.am.ActivityManagerService;
import com.android.internal.os.BinderInternal;
import com.android.internal.os.SamplingProfilerIntegration;
+import com.trustedlogic.trustednfc.android.server.NfcService;
import dalvik.system.VMRuntime;
import dalvik.system.Zygote;
@@ -41,6 +42,7 @@
import android.server.BluetoothService;
import android.server.search.SearchManagerService;
import android.util.EventLog;
+import android.util.Log;
import android.util.Slog;
import android.accounts.AccountManagerService;
@@ -409,6 +411,20 @@
} catch (Throwable e) {
Slog.e(TAG, "Failure starting Recognition Service", e);
}
+
+ try {
+ Slog.i(TAG, "Nfc Service");
+ NfcService nfc;
+ try {
+ nfc = new NfcService(context);
+ } catch (UnsatisfiedLinkError e) { // gross hack to detect NFC
+ nfc = null;
+ Slog.w(TAG, "No NFC support");
+ }
+ ServiceManager.addService(Context.NFC_SERVICE, nfc);
+ } catch (Throwable e) {
+ Slog.e(TAG, "Failure starting NFC Service", e);
+ }
try {
Slog.i(TAG, "DiskStats Service");