diff options
author | Nick Pelly <npelly@google.com> | 2011-08-01 13:53:08 -0700 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2011-08-01 14:42:51 -0700 |
commit | f39dd4cf73e846cdc9523f70df5c12984930751f (patch) | |
tree | 2ec1aa83adacdb1416f8f01e35efd2eccaec2460 /src | |
parent | d7722304dea9d7e8fd47ec8964773953622da8f8 (diff) | |
download | packages_apps_nfc-f39dd4cf73e846cdc9523f70df5c12984930751f.zip packages_apps_nfc-f39dd4cf73e846cdc9523f70df5c12984930751f.tar.gz packages_apps_nfc-f39dd4cf73e846cdc9523f70df5c12984930751f.tar.bz2 |
Fix bug: use foreground dispatch when ndef push is enabled via callback.
The previous code only checked for a static message, not the callback.
Change-Id: Ib0f2db42423ca8b11ece7f4b20adb7969911c8ba
Diffstat (limited to 'src')
-rwxr-xr-x | src/com/android/nfc/NdefP2pManager.java | 4 | ||||
-rw-r--r-- | src/com/android/nfc/NfcDispatcher.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/nfc/NdefP2pManager.java b/src/com/android/nfc/NdefP2pManager.java index 9f1dadc..640e6ff 100755 --- a/src/com/android/nfc/NdefP2pManager.java +++ b/src/com/android/nfc/NdefP2pManager.java @@ -168,9 +168,9 @@ public class NdefP2pManager { } } - public NdefMessage getForegroundMessage() { + public boolean isForegroundPushEnabled() { synchronized (this) { - return mForegroundMsg; + return mForegroundMsg != null || mCallback != null; } } diff --git a/src/com/android/nfc/NfcDispatcher.java b/src/com/android/nfc/NfcDispatcher.java index 669f1d4..cdc4108 100644 --- a/src/com/android/nfc/NfcDispatcher.java +++ b/src/com/android/nfc/NfcDispatcher.java @@ -96,7 +96,7 @@ public class NfcDispatcher { IntentFilter[] overrideFilters; PendingIntent overrideIntent; String[][] overrideTechLists; - boolean foregroundNdefPush = mP2pManager.getForegroundMessage() != null; + boolean foregroundNdefPush = mP2pManager.isForegroundPushEnabled(); synchronized (this) { overrideFilters = mOverrideFilters; overrideIntent = mOverrideIntent; |