summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Hamilton <jham@android.com>2011-06-13 22:22:11 -0500
committerJeff Hamilton <jham@android.com>2011-06-13 23:00:59 -0500
commit81c476dd93f059d4082c15369894d5d16fbea05d (patch)
treef705333cb44d05731a763284eea7ed755577bef7
parentfbd90779b1525b254726eb58d07883ca74e1b21c (diff)
downloadpackages_apps_nfc-81c476dd93f059d4082c15369894d5d16fbea05d.zip
packages_apps_nfc-81c476dd93f059d4082c15369894d5d16fbea05d.tar.gz
packages_apps_nfc-81c476dd93f059d4082c15369894d5d16fbea05d.tar.bz2
Relocate the libnfc-nxp Java bridge sources.
Change-Id: I0b743245d60bf9c47ce84ec0ab7fd8c5b6202ec9
-rw-r--r--jni/com_android_nfc_NativeLlcpConnectionlessSocket.cpp2
-rw-r--r--jni/com_android_nfc_NativeLlcpServiceSocket.cpp6
-rw-r--r--jni/com_android_nfc_NativeLlcpSocket.cpp2
-rw-r--r--jni/com_android_nfc_NativeNfcManager.cpp24
-rwxr-xr-xjni/com_android_nfc_NativeNfcSecureElement.cpp2
-rw-r--r--jni/com_android_nfc_NativeNfcTag.cpp2
-rw-r--r--jni/com_android_nfc_NativeP2pDevice.cpp2
-rwxr-xr-xsrc/com/android/nfc/NfcService.java21
-rwxr-xr-xsrc/com/android/nfc/nxp/NativeLlcpConnectionlessSocket.java (renamed from src/com/android/nfc/NativeLlcpConnectionlessSocket.java)2
-rwxr-xr-xsrc/com/android/nfc/nxp/NativeLlcpServiceSocket.java (renamed from src/com/android/nfc/NativeLlcpServiceSocket.java)2
-rwxr-xr-xsrc/com/android/nfc/nxp/NativeLlcpSocket.java (renamed from src/com/android/nfc/NativeLlcpSocket.java)2
-rwxr-xr-xsrc/com/android/nfc/nxp/NativeNfcManager.java (renamed from src/com/android/nfc/NativeNfcManager.java)4
-rwxr-xr-xsrc/com/android/nfc/nxp/NativeNfcSecureElement.java (renamed from src/com/android/nfc/NativeNfcSecureElement.java)2
-rwxr-xr-xsrc/com/android/nfc/nxp/NativeNfcTag.java (renamed from src/com/android/nfc/NativeNfcTag.java)2
-rwxr-xr-xsrc/com/android/nfc/nxp/NativeP2pDevice.java (renamed from src/com/android/nfc/NativeP2pDevice.java)2
15 files changed, 37 insertions, 40 deletions
diff --git a/jni/com_android_nfc_NativeLlcpConnectionlessSocket.cpp b/jni/com_android_nfc_NativeLlcpConnectionlessSocket.cpp
index 959a489..f409145 100644
--- a/jni/com_android_nfc_NativeLlcpConnectionlessSocket.cpp
+++ b/jni/com_android_nfc_NativeLlcpConnectionlessSocket.cpp
@@ -250,7 +250,7 @@ static JNINativeMethod gMethods[] =
int register_com_android_nfc_NativeLlcpConnectionlessSocket(JNIEnv *e)
{
return jniRegisterNativeMethods(e,
- "com/android/nfc/NativeLlcpConnectionlessSocket",
+ "com/android/nfc/nxp/NativeLlcpConnectionlessSocket",
gMethods, NELEM(gMethods));
}
diff --git a/jni/com_android_nfc_NativeLlcpServiceSocket.cpp b/jni/com_android_nfc_NativeLlcpServiceSocket.cpp
index 653a5c0..49c8c05 100644
--- a/jni/com_android_nfc_NativeLlcpServiceSocket.cpp
+++ b/jni/com_android_nfc_NativeLlcpServiceSocket.cpp
@@ -139,7 +139,7 @@ static jobject com_NativeLlcpServiceSocket_doAccept(JNIEnv *e, jobject o, jint m
}
/* Create new LlcpSocket object */
- if(nfc_jni_cache_object(e,"com/android/nfc/NativeLlcpSocket",&(clientSocket)) == -1)
+ if(nfc_jni_cache_object(e,"com/android/nfc/nxp/NativeLlcpSocket",&(clientSocket)) == -1)
{
LOGD("LLCP Socket creation error");
goto clean_and_return;
@@ -209,7 +209,7 @@ static jboolean com_NativeLlcpServiceSocket_doClose(JNIEnv *e, jobject o)
*/
static JNINativeMethod gMethods[] =
{
- {"doAccept", "(III)Lcom/android/nfc/NativeLlcpSocket;",
+ {"doAccept", "(III)Lcom/android/nfc/nxp/NativeLlcpSocket;",
(void *)com_NativeLlcpServiceSocket_doAccept},
{"doClose", "()Z",
@@ -220,7 +220,7 @@ static JNINativeMethod gMethods[] =
int register_com_android_nfc_NativeLlcpServiceSocket(JNIEnv *e)
{
return jniRegisterNativeMethods(e,
- "com/android/nfc/NativeLlcpServiceSocket",
+ "com/android/nfc/nxp/NativeLlcpServiceSocket",
gMethods, NELEM(gMethods));
}
diff --git a/jni/com_android_nfc_NativeLlcpSocket.cpp b/jni/com_android_nfc_NativeLlcpSocket.cpp
index a6911d8..b2784f6 100644
--- a/jni/com_android_nfc_NativeLlcpSocket.cpp
+++ b/jni/com_android_nfc_NativeLlcpSocket.cpp
@@ -459,7 +459,7 @@ static JNINativeMethod gMethods[] =
int register_com_android_nfc_NativeLlcpSocket(JNIEnv *e)
{
return jniRegisterNativeMethods(e,
- "com/android/nfc/NativeLlcpSocket",gMethods, NELEM(gMethods));
+ "com/android/nfc/nxp/NativeLlcpSocket",gMethods, NELEM(gMethods));
}
} // namespace android
diff --git a/jni/com_android_nfc_NativeNfcManager.cpp b/jni/com_android_nfc_NativeNfcManager.cpp
index 9a697d8..247da0a 100644
--- a/jni/com_android_nfc_NativeNfcManager.cpp
+++ b/jni/com_android_nfc_NativeNfcManager.cpp
@@ -1618,16 +1618,16 @@ static jboolean com_android_nfc_NfcManager_init_native_struc(JNIEnv *e, jobject
/* Initialize native cached references */
cached_NfcManager_notifyNdefMessageListeners = e->GetMethodID(cls,
- "notifyNdefMessageListeners","(Lcom/android/nfc/NativeNfcTag;)V");
+ "notifyNdefMessageListeners","(Lcom/android/nfc/nxp/NativeNfcTag;)V");
cached_NfcManager_notifyTransactionListeners = e->GetMethodID(cls,
"notifyTransactionListeners", "([B)V");
cached_NfcManager_notifyLlcpLinkActivation = e->GetMethodID(cls,
- "notifyLlcpLinkActivation","(Lcom/android/nfc/NativeP2pDevice;)V");
+ "notifyLlcpLinkActivation","(Lcom/android/nfc/nxp/NativeP2pDevice;)V");
cached_NfcManager_notifyLlcpLinkDeactivated = e->GetMethodID(cls,
- "notifyLlcpLinkDeactivated","(Lcom/android/nfc/NativeP2pDevice;)V");
+ "notifyLlcpLinkDeactivated","(Lcom/android/nfc/nxp/NativeP2pDevice;)V");
cached_NfcManager_notifyTargetDeselected = e->GetMethodID(cls,
"notifyTargetDeselected","()V");
@@ -1638,13 +1638,13 @@ static jboolean com_android_nfc_NfcManager_init_native_struc(JNIEnv *e, jobject
cached_NfcManager_notifySeFieldDeactivated = e->GetMethodID(cls,
"notifySeFieldDeactivated", "()V");
- if(nfc_jni_cache_object(e,"com/android/nfc/NativeNfcTag",&(nat->cached_NfcTag)) == -1)
+ if(nfc_jni_cache_object(e,"com/android/nfc/nxp/NativeNfcTag",&(nat->cached_NfcTag)) == -1)
{
LOGD("Native Structure initialization failed");
return FALSE;
}
- if(nfc_jni_cache_object(e,"com/android/nfc/NativeP2pDevice",&(nat->cached_P2pDevice)) == -1)
+ if(nfc_jni_cache_object(e,"com/android/nfc/nxp/NativeP2pDevice",&(nat->cached_P2pDevice)) == -1)
{
LOGD("Native Structure initialization failed");
return FALSE;
@@ -2048,7 +2048,7 @@ static jobject com_android_nfc_NfcManager_doCreateLlcpConnectionlessSocket(JNIEn
/* Create new NativeLlcpConnectionlessSocket object */
- if(nfc_jni_cache_object(e,"com/android/nfc/NativeLlcpConnectionlessSocket",&(connectionlessSocket)) == -1)
+ if(nfc_jni_cache_object(e,"com/android/nfc/nxp/NativeLlcpConnectionlessSocket",&(connectionlessSocket)) == -1)
{
return NULL;
}
@@ -2166,7 +2166,7 @@ static jobject com_android_nfc_NfcManager_doCreateLlcpServiceSocket(JNIEnv *e, j
TRACE("phLibNfc_Llcp_Listen() returned 0x%04x[%s]", ret, nfc_jni_get_status_name(ret));
/* Create new NativeLlcpServiceSocket object */
- if(nfc_jni_cache_object(e,"com/android/nfc/NativeLlcpServiceSocket",&(serviceSocket)) == -1)
+ if(nfc_jni_cache_object(e,"com/android/nfc/nxp/NativeLlcpServiceSocket",&(serviceSocket)) == -1)
{
LOGE("Llcp Socket object creation error");
return NULL;
@@ -2245,7 +2245,7 @@ static jobject com_android_nfc_NfcManager_doCreateLlcpSocket(JNIEnv *e, jobject
TRACE("phLibNfc_Llcp_Socket() returned 0x%04x[%s]", ret, nfc_jni_get_status_name(ret));
/* Create new NativeLlcpSocket object */
- if(nfc_jni_cache_object(e,"com/android/nfc/NativeLlcpSocket",&(clientSocket)) == -1)
+ if(nfc_jni_cache_object(e,"com/android/nfc/nxp/NativeLlcpSocket",&(clientSocket)) == -1)
{
LOGE("Llcp socket object creation error");
return NULL;
@@ -2354,13 +2354,13 @@ static JNINativeMethod gMethods[] =
{"doActivateLlcp", "()Z",
(void *)com_android_nfc_NfcManager_doActivateLlcp},
- {"doCreateLlcpConnectionlessSocket", "(I)Lcom/android/nfc/NativeLlcpConnectionlessSocket;",
+ {"doCreateLlcpConnectionlessSocket", "(I)Lcom/android/nfc/nxp/NativeLlcpConnectionlessSocket;",
(void *)com_android_nfc_NfcManager_doCreateLlcpConnectionlessSocket},
- {"doCreateLlcpServiceSocket", "(ILjava/lang/String;III)Lcom/android/nfc/NativeLlcpServiceSocket;",
+ {"doCreateLlcpServiceSocket", "(ILjava/lang/String;III)Lcom/android/nfc/nxp/NativeLlcpServiceSocket;",
(void *)com_android_nfc_NfcManager_doCreateLlcpServiceSocket},
- {"doCreateLlcpSocket", "(IIII)Lcom/android/nfc/NativeLlcpSocket;",
+ {"doCreateLlcpSocket", "(IIII)Lcom/android/nfc/nxp/NativeLlcpSocket;",
(void *)com_android_nfc_NfcManager_doCreateLlcpSocket},
{"doGetLastError", "()I",
@@ -2389,7 +2389,7 @@ int register_com_android_nfc_NativeNfcManager(JNIEnv *e)
}
return jniRegisterNativeMethods(e,
- "com/android/nfc/NativeNfcManager",
+ "com/android/nfc/nxp/NativeNfcManager",
gMethods, NELEM(gMethods));
}
diff --git a/jni/com_android_nfc_NativeNfcSecureElement.cpp b/jni/com_android_nfc_NativeNfcSecureElement.cpp
index f309122..56b248f 100755
--- a/jni/com_android_nfc_NativeNfcSecureElement.cpp
+++ b/jni/com_android_nfc_NativeNfcSecureElement.cpp
@@ -720,7 +720,7 @@ static JNINativeMethod gMethods[] =
int register_com_android_nfc_NativeNfcSecureElement(JNIEnv *e)
{
return jniRegisterNativeMethods(e,
- "com/android/nfc/NativeNfcSecureElement",
+ "com/android/nfc/nxp/NativeNfcSecureElement",
gMethods, NELEM(gMethods));
}
diff --git a/jni/com_android_nfc_NativeNfcTag.cpp b/jni/com_android_nfc_NativeNfcTag.cpp
index 566b28e..b9fcb21 100644
--- a/jni/com_android_nfc_NativeNfcTag.cpp
+++ b/jni/com_android_nfc_NativeNfcTag.cpp
@@ -1248,7 +1248,7 @@ static JNINativeMethod gMethods[] =
int register_com_android_nfc_NativeNfcTag(JNIEnv *e)
{
return jniRegisterNativeMethods(e,
- "com/android/nfc/NativeNfcTag",
+ "com/android/nfc/nxp/NativeNfcTag",
gMethods, NELEM(gMethods));
}
diff --git a/jni/com_android_nfc_NativeP2pDevice.cpp b/jni/com_android_nfc_NativeP2pDevice.cpp
index fd9af3e..568379e 100644
--- a/jni/com_android_nfc_NativeP2pDevice.cpp
+++ b/jni/com_android_nfc_NativeP2pDevice.cpp
@@ -478,7 +478,7 @@ static JNINativeMethod gMethods[] =
int register_com_android_nfc_NativeP2pDevice(JNIEnv *e)
{
return jniRegisterNativeMethods(e,
- "com/android/nfc/NativeP2pDevice",
+ "com/android/nfc/nxp/NativeP2pDevice",
gMethods, NELEM(gMethods));
}
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
index c2f77dc..530a447 100755
--- a/src/com/android/nfc/NfcService.java
+++ b/src/com/android/nfc/NfcService.java
@@ -18,20 +18,21 @@ package com.android.nfc;
import com.android.internal.nfc.LlcpServiceSocket;
import com.android.internal.nfc.LlcpSocket;
-import com.android.nfc.RegisteredComponentCache.ComponentInfo;
import com.android.nfc.ndefpush.NdefPushClient;
import com.android.nfc.ndefpush.NdefPushServer;
+import com.android.nfc.nxp.NativeLlcpConnectionlessSocket;
+import com.android.nfc.nxp.NativeLlcpServiceSocket;
+import com.android.nfc.nxp.NativeLlcpSocket;
+import com.android.nfc.nxp.NativeNfcManager;
+import com.android.nfc.nxp.NativeNfcSecureElement;
+import com.android.nfc.nxp.NativeNfcTag;
+import com.android.nfc.nxp.NativeP2pDevice;
import com.android.nfc3.R;
-import android.app.Activity;
-import android.app.ActivityManagerNative;
import android.app.Application;
-import android.app.IActivityManager;
import android.app.KeyguardManager;
import android.app.PendingIntent;
-import android.app.PendingIntent.CanceledException;
import android.app.StatusBarManager;
-import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
@@ -39,9 +40,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
import android.net.Uri;
-import android.nfc.ApduList;
import android.nfc.ErrorCodes;
import android.nfc.FormatException;
import android.nfc.ILlcpConnectionlessSocket;
@@ -55,12 +54,11 @@ import android.nfc.IP2pInitiator;
import android.nfc.IP2pTarget;
import android.nfc.LlcpPacket;
import android.nfc.NdefMessage;
-import android.nfc.NdefRecord;
import android.nfc.NfcAdapter;
import android.nfc.Tag;
-import android.nfc.tech.TagTechnology;
import android.nfc.TechListParcel;
import android.nfc.TransceiveResult;
+import android.nfc.tech.TagTechnology;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
@@ -73,14 +71,11 @@ import android.util.Log;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
-import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.nio.charset.Charsets;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
diff --git a/src/com/android/nfc/NativeLlcpConnectionlessSocket.java b/src/com/android/nfc/nxp/NativeLlcpConnectionlessSocket.java
index d4a5f14..0f4571d 100755
--- a/src/com/android/nfc/NativeLlcpConnectionlessSocket.java
+++ b/src/com/android/nfc/nxp/NativeLlcpConnectionlessSocket.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.nfc;
+package com.android.nfc.nxp;
import android.nfc.LlcpPacket;
diff --git a/src/com/android/nfc/NativeLlcpServiceSocket.java b/src/com/android/nfc/nxp/NativeLlcpServiceSocket.java
index 4ceb5f0..2eb8ab7 100755
--- a/src/com/android/nfc/NativeLlcpServiceSocket.java
+++ b/src/com/android/nfc/nxp/NativeLlcpServiceSocket.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.nfc;
+package com.android.nfc.nxp;
/**
* LlcpServiceSocket represents a LLCP Service to be used in a
diff --git a/src/com/android/nfc/NativeLlcpSocket.java b/src/com/android/nfc/nxp/NativeLlcpSocket.java
index 990f14f..4132c3a 100755
--- a/src/com/android/nfc/NativeLlcpSocket.java
+++ b/src/com/android/nfc/nxp/NativeLlcpSocket.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.nfc;
+package com.android.nfc.nxp;
/**
* LlcpClientSocket represents a LLCP Connection-Oriented client to be used in a
diff --git a/src/com/android/nfc/NativeNfcManager.java b/src/com/android/nfc/nxp/NativeNfcManager.java
index 4172cac..97d8e4f 100755
--- a/src/com/android/nfc/NativeNfcManager.java
+++ b/src/com/android/nfc/nxp/NativeNfcManager.java
@@ -14,7 +14,9 @@
* limitations under the License.
*/
-package com.android.nfc;
+package com.android.nfc.nxp;
+
+import com.android.nfc.NfcService;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
diff --git a/src/com/android/nfc/NativeNfcSecureElement.java b/src/com/android/nfc/nxp/NativeNfcSecureElement.java
index 5ac0534..768ad2f 100755
--- a/src/com/android/nfc/NativeNfcSecureElement.java
+++ b/src/com/android/nfc/nxp/NativeNfcSecureElement.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.nfc;
+package com.android.nfc.nxp;
diff --git a/src/com/android/nfc/NativeNfcTag.java b/src/com/android/nfc/nxp/NativeNfcTag.java
index f5af2f2..6fd8105 100755
--- a/src/com/android/nfc/NativeNfcTag.java
+++ b/src/com/android/nfc/nxp/NativeNfcTag.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.nfc;
+package com.android.nfc.nxp;
import android.nfc.tech.IsoDep;
import android.nfc.tech.Ndef;
diff --git a/src/com/android/nfc/NativeP2pDevice.java b/src/com/android/nfc/nxp/NativeP2pDevice.java
index db7cbea..0d9eb32 100755
--- a/src/com/android/nfc/NativeP2pDevice.java
+++ b/src/com/android/nfc/nxp/NativeP2pDevice.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.nfc;
+package com.android.nfc.nxp;
/**
* Native interface to the P2P Initiator functions