summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2011-08-02 18:47:54 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-02 18:47:54 -0700
commit889e0c765c9f1581fca5b8e4f5a9d0005dcf4680 (patch)
tree31c99ca79aac6b3f7a3aec8ae2c46a27ad9e8329 /src
parent9a900be8c4645f0c3c374b5e43fb313a26218503 (diff)
parentf2500d4518ac7c8b41a0f2ab5d0926196fbae6e1 (diff)
downloadpackages_apps_nfc-889e0c765c9f1581fca5b8e4f5a9d0005dcf4680.zip
packages_apps_nfc-889e0c765c9f1581fca5b8e4f5a9d0005dcf4680.tar.gz
packages_apps_nfc-889e0c765c9f1581fca5b8e4f5a9d0005dcf4680.tar.bz2
Merge "Allow NDEF swap."
Diffstat (limited to 'src')
-rwxr-xr-xsrc/com/android/nfc/NdefP2pManager.java6
-rw-r--r--src/com/android/nfc/NfcDispatcher.java21
2 files changed, 6 insertions, 21 deletions
diff --git a/src/com/android/nfc/NdefP2pManager.java b/src/com/android/nfc/NdefP2pManager.java
index affb9a3..4a28766 100755
--- a/src/com/android/nfc/NdefP2pManager.java
+++ b/src/com/android/nfc/NdefP2pManager.java
@@ -134,12 +134,6 @@ public class NdefP2pManager {
return ndefMsg;
}
- public boolean isForegroundPushEnabled() {
- synchronized (this) {
- return mForegroundMsg != null || mCallback != null;
- }
- }
-
void llcpActivated() {
if (DBG) Log.d(TAG, "LLCP connection up and running");
diff --git a/src/com/android/nfc/NfcDispatcher.java b/src/com/android/nfc/NfcDispatcher.java
index cdc4108..742eb18 100644
--- a/src/com/android/nfc/NfcDispatcher.java
+++ b/src/com/android/nfc/NfcDispatcher.java
@@ -96,7 +96,6 @@ public class NfcDispatcher {
IntentFilter[] overrideFilters;
PendingIntent overrideIntent;
String[][] overrideTechLists;
- boolean foregroundNdefPush = mP2pManager.isForegroundPushEnabled();
synchronized (this) {
overrideFilters = mOverrideFilters;
overrideIntent = mOverrideIntent;
@@ -123,21 +122,13 @@ public class NfcDispatcher {
}
}
- // If there is not foreground NDEF push setup try a normal dispatch.
- //
- // This is avoided when disabled in the NDEF push case to avoid the situation where each
- // user has a different app in the foreground, causing each to launch itself on the
- // remote device and the apps swapping which is in the foreground on each phone.
- if (!foregroundNdefPush) {
- try {
- return dispatchTagInternal(tag, msgs, null, null, null);
- } catch (CanceledException e) {
- Log.e(TAG, "CanceledException unexpected here", e);
- return false;
- }
+ // Try normal dispatch.
+ try {
+ return dispatchTagInternal(tag, msgs, null, null, null);
+ } catch (CanceledException e) {
+ Log.e(TAG, "CanceledException unexpected here", e);
+ return false;
}
-
- return false;
}
private Intent buildTagIntent(Tag tag, NdefMessage[] msgs, String action) {