diff options
author | Nick Pelly <npelly@google.com> | 2011-08-02 18:47:54 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-08-02 18:47:54 -0700 |
commit | 889e0c765c9f1581fca5b8e4f5a9d0005dcf4680 (patch) | |
tree | 31c99ca79aac6b3f7a3aec8ae2c46a27ad9e8329 /src | |
parent | 9a900be8c4645f0c3c374b5e43fb313a26218503 (diff) | |
parent | f2500d4518ac7c8b41a0f2ab5d0926196fbae6e1 (diff) | |
download | packages_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-x | src/com/android/nfc/NdefP2pManager.java | 6 | ||||
-rw-r--r-- | src/com/android/nfc/NfcDispatcher.java | 21 |
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) { |