diff options
author | Nick Pelly <npelly@google.com> | 2011-08-02 18:09:26 -0700 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2011-08-02 18:12:06 -0700 |
commit | f2500d4518ac7c8b41a0f2ab5d0926196fbae6e1 (patch) | |
tree | 343063d3b5eb53f3b37473279ca1f1492c464dce /src/com/android/nfc/NfcDispatcher.java | |
parent | 5ce39aec169a275e814286372256277819593829 (diff) | |
download | packages_apps_nfc-f2500d4518ac7c8b41a0f2ab5d0926196fbae6e1.zip packages_apps_nfc-f2500d4518ac7c8b41a0f2ab5d0926196fbae6e1.tar.gz packages_apps_nfc-f2500d4518ac7c8b41a0f2ab5d0926196fbae6e1.tar.bz2 |
Allow NDEF swap.
Try normal NDEF dispatch even if the foreground activity pushed NDEF.
Change-Id: I6fd17ae14ff3e15b43ffdc9b0304c374ca981c51
Diffstat (limited to 'src/com/android/nfc/NfcDispatcher.java')
-rw-r--r-- | src/com/android/nfc/NfcDispatcher.java | 21 |
1 files changed, 6 insertions, 15 deletions
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) { |