History log of /packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e15820b67fea55fbe84103ab38e2adc22fab99d8 05-Oct-2016 Peng Sun <peng.x.sun@sonymobile.com> Reset AndroidBeam Send UI flag

Old implementation keeps using old NDEF flag which was set by
previous app even after app closed.
This will affect the behavior of next app. So mSendFlags should be
reset to show AndroidBeam Send UI when NDEF push callback is not valid.

Bug: 31952858
Test: No
Change-Id: I01d0b10fb21a0d4f3cd46be48edf87716c4ebe1b
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
73c03d85bfdfc8c4e1255ede5231991bce5e575a 06-Jan-2017 Ruchi Kandoi <kandoiruchi@google.com> Separate Bluetooth handover failed and not supported cases during P2P

If devices wanting to transfer files over Android beam move away before
the Bluetooth handover is completed, there is a connection error which
is generated, in the higher level, this error is considered as handover
not supported resulting in wrong toast to user "The receiver\'s device
doesn\'t support large file transfer via beam." This change segregates
the errors to the right types.

Test: Manual; try to send a file, move the phone away quickly for
Bluetooth handover to fail
Bug: 34007014
Signed-off-by: Ruchi Kandoi<kandoiruchi@google.com>
Change-Id: I8d1a16a6991884a17869e6ed9b7a8c960c17951a
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
794585174b5812f47c4fbc3cc34184f4379bdbb8 27-Jul-2015 Alex Chau <alexchau@google.com> Fix NFC onManualBeamInvoke issue with policy

Clear NFC data in onManualBeamInvoke, to avoid previously cached NFC
data from being used despite beam is disallowed by policy

Note: There is still a potential problem when onManualBeamInvoke is
invoked in app's onResume. If you start the work app, disallow in
policy, then call onManualBeamInvoke in onResume, beam will still be
triggered and send out data. However, this is kind of an edge case as
app won't normally call onManualBeamInvoke in onResume, and only happens
if policy changed while the app has launched.

Bug: 21742271
Change-Id: Ib1bf340fd727962590b21945b253c980f079c0b8
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
5697d20844cf52e71aa9125ac1fbfc9436bd8ed5 15-Jun-2015 Alex Chau <alexchau@google.com> Disable NFC if policy disallow in foreground NDEF case

- Before this fix, NFC is only disabled in "default NDEF" cases, if NDEF callback is in foreground,
it will continue to send the beam without checking for policy.

Bug: 21742271
Change-Id: I19dd83160623bcfcc3e7cb2b0ffb5c4329e92d17
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
3ac6710f5a6cf7a9948046abd71f732eebe770b9 26-Mar-2015 Satoshi Fujita <satoshi.fujita@sonymobile.com> Fix NfcService crash when handover busy

When handover is busy state, onHandoverBusy() is called recursively and
NfcService crashes.

Change-Id: I8d4f291ab11713859dd3aa70ddde5439c94c17de
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
ddefd2afcd6b09c3a48db4b2f69377dbc3a8a282 23-Apr-2015 Martijn Coenen <maco@google.com> Beam / LLCP improvements.

- Don't show Beam UI unless the other device runs a SNEP server.
We didn't do this previously because an old stack issue could
delay the SNEP connect by as much as 750ms, therefore also
delaying the UI. We expect there to be very few of those devices
in use at this point (if any).
This also paves the way for preventing Beam UI to be shown when
connecting to future Android devices (those devices could shut down
SNEP in specific scenarios).
- Immediately try to connect LLCP (SNEP, handover) services.
We didn't do this previously because the old stack had race conditions,
which could be triggered by immediately sending a LLCP connect.
Again, very few of those devices are expected to be in use
at this point.
Making this change will generally decrease the latency of a P2P
transaction, especially in scenarios where the send was previously
authorized (ie from the share menu).
- Fixed a bug in SendUi where it wouldn't store the screenshot in
a specific case. We're only hitting this now because of the two
changes I mentioned above.
- A bit of clean-up (though this class could use a lot more...)

Change-Id: I52f5ff314dc06e5502bdf869ee658078c3a44fde
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
2daeeee63456a515693980372908234e1fa14ba5 15-Apr-2015 Martijn Coenen <maco@google.com> Expose peer LLCP version to apps.

Change-Id: Id5ea699a8508b5bdf44c0bae2d38893e2c42241a
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
95302c119feba7f50a5193861619346908a96164 02-Dec-2014 Andres Morales <anmorales@google.com> Read UserHandle from passed in ShareData

When Beam is manually invoked, ShareData
can be passed in, must read out UserHandle in this
branch.

Bug:18581279
Change-Id: Id9b0d4e27ec60fb16b16b92f063009a20280e410
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
aaca83594d177442e993a8ba68349a5f7cb31200 14-Nov-2014 Andres Morales <anmorales@google.com> Add toast to tell the user Beam is busy

Follow up CL for b/17966846

Bug: 17966846
Change-Id: I7fad0c31cbedc278fa9354765f3612501cd8c672
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
b82d80d891077ccd74729e4143925a66eb89eef2 24-Oct-2014 Andres Morales <anmorales@google.com> Refactor Beam to work with managed profiles

Simplify logic and break out different components
into their own services.

Allow BeamShareData to pass a UserHandle in order
to start the transfer in the correct user.

Bug: 17966846
Change-Id: I012a9ebe87deca6fceb857da8c8d4e2ecbeca6fe
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
65860bb589c5802ffadb14540670408d6c8dfaa9 15-Oct-2014 Benjamin Franz <bfranz@google.com> Reactivate Beam sharing for managed profiles.

Bug: 17916693
Change-Id: I41f2a0e45378365a0ef7c042067c85d234b1a00b
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
b42756d47f39774a07654f68af27bf3cc2c41511 04-Sep-2014 Andres Morales <anmorales@google.com> Don't allow Beam for devices with DISALLOW_OUTGOING_BEAM

Bug:17387303
Change-Id: Idb892839627315d08f010a705506d8668d8eb5dc
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
5c452dad7b24f28223414ce5e953bfcab782570e 21-Aug-2014 Andres Morales <anmorales@google.com> Disable Beam for managed profiles

Bug:17009804
Change-Id: I57e82216f8d54bc71b318c648c045378ccdbf5bb
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
73fa3d8e3d049718947ad26d339a85f566a90bf8 14-Aug-2014 Martijn Coenen <maco@google.com> Remove deprecated event logging.

Bug: 17033091
Change-Id: I3a096699339f4c150e14af5fdf34835653a571c3
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
c4ff3393f54403064b237349277cbf65f3277285 23-Jul-2014 Martijn Coenen <maco@google.com> Fix ForegroundUtils ignoring PID.

ForegroundUtils just kept track of UIDs and
ignored PIDs. However, some apps may have multiple
processes running with the same UID, causing transitions
like:

UID 10010 PID 1234 -> Foreground = true
UID 10010 PID 5678 -> Foreground = false

In this order this would cause us to remove UID 10010
from the foreground list, whereas it still has a PID
in the foreground.

Fixed this by keeping track of the foreground PIDs
per UID, and a UID is only considered to go to the background
if it doesn't have any PIDs left in the foreground.

Bug: 16514707
Change-Id: I160e4403a21d150497b88c336401dd8ddcb87082
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
34322b73c1e09907cb007e86bae77c744b338cd7 01-Jul-2014 Martijn Coenen <maco@google.com> Fix invoking Beam from share menu for multi-user.

Don't call into NfcService from Binder, but instead
through a newly added IPC call.

Also, get rid of deprecated ActivityManager calls
to determine foreground task, and use new
ForegroundUtils for that instead,

Bug: 15939863

Change-Id: If5a4b64de337abc36b1f1df30b4f612946e8496f
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
9340b42304a512cb8fe9f4c068ba1b908876fb10 07-Jan-2014 Martijn Coenen <maco@google.com> Android Beam direct invoke / share menu invoking.

This change allows Android Beam to be invoked
directly from an application.

Additionally, it adds handling for the ACTION_SEND
intent that is launched by various apps when using the
share menu. This will cause Android Beam to be shown
as an option in share menus. There's some logic needed
that translates the data in an ACTION_SEND intent to
either NDEF message or an Uri that can be shared using
handover.

Finally, the Beam UI code has been modified to instantiate
a proper window, in order for us to catch the back key
event to be able to back out of the Beam animation
(this wasn't possible previously).

Bug: 5134061
Change-Id: I9cbfc50109bb497973bae177c67d920f6f990789
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
d2604c0544f7bc26e5b2407f0215cccfffedae2c 11-Dec-2013 Andres Morales <anmorales@google.com> Expose snooze mode config and polling modes in java layer

Change-Id: I3a604fb4260a1e99e6aa40189e999996d5947ed4
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
31f39aee25964dad1038b7a9cc335d5a386113c8 03-Sep-2013 Martijn Coenen <maco@google.com> Changes for callback model of reader mode APIs.

Bug: 10360259
Change-Id: I41c47ce84aa18bce01f6fb1ebe280fac0ed79070
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
a8aa07142ea0078d3ae4ae486e094e2f2f4ff732 27-Mar-2013 Evan Chu <evanchu@broadcom.com> Sync up with Broadcom JNI changes.

Patches contributed by Evan Chu<evanchu@broadcom.com>
and Paul Chaisson<pchaisson@broadcom.com>.

Bug: 10360038
Change-Id: I1402191406b08e097680f8c7f587f393f749184e
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
65468cb547f654afbdb00182f3a9f3f509b0d08c 01-Jul-2013 Elliott Hughes <enh@google.com> am 844501b2: Merge "Switch NFC over to the public StandardCharsets."

* commit '844501b273a9848da220910a5db5f535e42c167f':
Switch NFC over to the public StandardCharsets.
893bc90a71883f8d2bfc82818abbf21c9745efda 29-Jun-2013 Elliott Hughes <enh@google.com> Switch NFC over to the public StandardCharsets.

Change-Id: I9704a7a8e6b8e6e4c52f60e2704d69993ee8aa41
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
2f61bcadb10697036a5ce5ad893607f5dcdcda9d 22-May-2013 Martijn Coenen <maco@google.com> Use top activity when determining foreground package.

If you have an activity stack where the base activity
belongs to a different package, NfcService would use
the wrong package for determining whether the current
foreground app is allowed to have an ndef message (callback) set.
This could cause Activity stacks like Settings -> Storage ->
Pictures & Videos -> Gallery to fail sending pictures.

Use the top activity instead.

Bug: 9072009
Change-Id: I32fbbea1423333117d2a0522eced98ecf9a758e7
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
7a499e775021bafefbe890d079e2a43f4a54482c 24-Apr-2013 Martijn Coenen <maco@google.com> Avoid P2P/SMX race conditions in NXP stack.

Google Wallet can trigger off field P2P field events
and initiate communication with the SMX. The NXP stack
appears to contain some tricky race conditions around
opening/closing the SMX close to P2P interactions. For now,
do not allow NFCEE access while a P2P link is still active.

Bug: 8552749
Change-Id: I7acae39bc22cebb5d79a484990dcd3fc5f3dad23
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
d72b205b870f4bccb33d466a0b4f704aca8d060a 15-Apr-2013 Martijn Coenen <maco@google.com> Remain compatible with 4.1 handover-over-SNEP devices.

Android Jelly Bean 4.1 shipped with a handover implementation
that (erroneously) used the SNEP server for exchanging handover
messages. This was corrected in future releases, however to maintain
compatibility with the 4.1 devices, continue connecting to SNEP
in case a connection to the handover service fails.

Bug: 8508568
Change-Id: I49ee98ef9c4569bdbff8aab4ee3f45264e019f3f
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
f1ca42a07636d17e7eae14bb994e7208d4d80f9a 09-Apr-2013 Martijn Coenen <maco@google.com> Merge "Properly reset field / listen mode flags in SE object." into jb-mr2-dev
b408fc371821c397b47c8722c339c6b4359e062f 09-Apr-2013 Martijn Coenen <maco@google.com> Properly reset field / listen mode flags in SE object.

On NFC disable, the SE object is "finalized" but not
destroyed. It is reused on the next NFC enable, but
the listen mode / field status flags were not cleared
then.

Bug: 8574917
Bug: 8489820
Change-Id: I8e11c60eda47762404a5d5020a0c2e6ff95ead2a
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
f36089a293850babe57d2dfd48a22e8d1daf0fc0 08-Apr-2013 Martijn Coenen <maco@google.com> Fix Android Beam animation.

SendUi.showStartSend() was being called twice.

Change-Id: I3893c138b1de94d87e556c438bffcf0039b2a086
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
cf4ef456bbf2c10f674b291ef7960af8b6bf6efa 07-Apr-2013 Emily Bernier <ember@google.com> Fixing NFC bug when confirm screen isn't required.

Change-Id: I198235ec91d454dabe34187bb51870cf1b0d4fb5
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
57a44d07a3de327e8cdbbcd622118aa517313dbe 28-Mar-2013 Martijn Coenen <maco@google.com> Deal with pre-MR2 PN544 NXP stack LLCP bugs.

In MR2 we started connecting LLCP on link
activation instead of when the send was confirmed. Pre-MR2
NXP-stack devices have a bug that causes them to only
send the first SYMM after 750 ms (in case they are the
initiator). There is another bug that causes that same stack
to crash if two threads try to send a packet at the same
time.

Unfortunately, this combination of factors creates the
following race:

1) pre-MR2 PN544-initiator initiates p2p link with MR2 device
2) pre-MR2 PN544-initiator starts Touch to Beam animation
3) pre-MR2 PN544 doesn't have data to send, but delays SYMM for 750ms
4) MR2 device finally gets SYMM after 750ms, and sends CONNECT PDU
5) pre-MR2 PN544-initiator device responds to CONNECT PDU with CC on Thread 1
6) Within a ~50 ms window, the user on the pre-MR2 PN544-initiator touches
the screen to confirm the send. This causes Thread 2 to try to send
something, which fails.

As a result, the Beam transaction fails. Unfortunately
this is quite easy to reproduce, since the Beam animation takes
about 750ms, just the same amount of time it takes for the SYMM
to get sent.

To prevent such a race condition, we should make sure that we do
not create multi-threaded access on the remote device. The best way
to do that is to not connect the LLCP services automatically when
talking to a pre-MR2 PN544-initiator.

Long story short, when we don't receive a first packet of data
after 200 ms, we consider the remote device to be a buggy
implementation, and delay the connect until the time the user
decides to send something (in which case it's fine - it's unlikely
the user at the other side tries to send something at exactly the
same time).

Also fixed RF field notifications to be more robust; whenever
p2p is activated, we disable field events, and always treat the
field as being on.

Bug: 8508568
Change-Id: I41b427afb24c7f8d228adc91d258cca553539588
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
cbe27470ef7e67324b9e8cbc32c25088d82e2a86 27-Mar-2013 Martijn Coenen <maco@google.com> Update to new IPC API for getting data to share.

It's now a single IPC call to retrieve potential NdefMessage,
Uris and flags to be shared over Beam. Since we do IPC calls
only when entering p2p range, limiting the amount of calls
reduces the amount of time the devices will need to be held
together.

Bug: 5134061
Change-Id: Id64748ff7994cfa792e97a8753d7b8e1cabb034b
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
1a158c7f354d1e1b031fba88928dbaa022e0d0df 12-Dec-2012 Martijn Coenen <maco@google.com> Make Beam more forgiving.

- Increased debounce time when nobody has pressed send
yet to 3 seconds - this gives users significantly
more time to press send, even when the link is down.
The only downside is that we stick in the Beam-animation
a bit longer, but in 99% of cases users actually intent
to send something, so this should be no problem.
- When the user does touch to send, if the link is down,
an even more forgiving debounce timer is started -
given the user 5 seconds to get the devices back
together. When they do get back together, the send
completes automatically.
- Also show a UI hint to get the devices back together whenever
the user has touched to send, but the link is broken.

Bug: 7124631
Change-Id: I0b0260f4eb92b11bf6bea8e571b43b38759c2bcc
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
3329e45c618c5896cb662f686930a75eb2ee5bbc 26-Feb-2013 Martijn Coenen <maco@google.com> Immediately connect to LLCP services.

When we discover a remote LLCP target, look at what
services the current foreground app has requested,
and immediately connect them.

This should increase our overall chance of success
of completing the transaction, as we no longer
need to setup the connection when the user taps
the screen to confirm the send.

It should also improve RIM interop; RIM devices
break the LLCP link if there are no service connections
within a certain time limit. Connecting the services
immediately prevents this.

Bug: 5155356
Change-Id: Ie4a578c1da31e3d5eb3b392b8236c681b45f9271
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
5bacd361e693472b7d54d31fe0d23b9d22851988 14-Feb-2013 Martijn Coenen <maco@google.com> Catch all exceptions when doing remote Binder calls.

When doing application callbacks for retrieving NDEF
data or notifying the application that an NDEF push
was completed, we should catch all exceptions, not
just RemoteExceptions.

Bug: 8179249
Change-Id: I35d30d52322f05b7998ef2e10f8da9d856a4b0d6
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
3859c5cccb202c20882fb3887cfa87babb1d85a3 08-Jan-2013 Martijn Coenen <maco@google.com> Enforce foreground NDEF push.

Store the calling UID along with the NDEF callback,
to make sure the registered callback is running in
the foreground.

Bug: 5199662
Change-Id: Ia6eb4457309445909629878f3371805a503fc82f
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
525c260303268a83da4c3413b953d13c9084e834 14-Dec-2012 The Android Open Source Project <initial-contribution@android.com> Snapshot 1a6bcf3cca90fedfbad33c1cdd6d05af5774fc01

Change-Id: I3ccb25bf7cde2c22f52260cae0e9957517e6bb5f
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
f5a196b643c654c7ea98a5e2935e3bff6683399b 11-Jul-2012 Martijn Coenen <maco@google.com> Implement connection handover LLCP service.

The Connection Handover specification dictates that we should
exchange Hr/Hs records over a dedicated LLCP service. This adds
the service, and starts using it by default. It will fall back
to the SNEP GET method to remain compatible with Android 4.1
devices. SNEP GET on these devices will return "Not Implemented",
also per the SNEP spec.

Also fixed a bug in endianness of the OOB record.

Bug: 6759842
Change-Id: Iafe67ab119e933df5dfa0a5645a95bc59badd8ae
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
0015304ebb1fda453f8b2ef660c39bf4f11dc771 06-Jun-2012 Martijn Coenen <maco@google.com> Don't assume Bluetooth is present.

Bug: 6620788
Change-Id: I39f7b106885b1bb932353c47c3b0f7370c56e8c4
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
a3715d12aeba988c1104726e935462ea4f39eca7 24-May-2012 Martijn Coenen <maco@google.com> Fall back to NDEF push if handover SNEP get fails.

This allows applications to be able to set both
a Uri (for handover) and an NDEF message, which
will only be sent if the handover request does
not work (as will be the case on pre-J devices).

Also, show a toast if the remote device does
not support connection handover.

Bug: 6561174
Change-Id: I9ffdcfdf0cded319fbb4ab646ae1da5382fcb74a
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
0f2b555fe51f3d8a828cf61d269b8be6eecbf68b 18-May-2012 Martijn Coenen <maco@google.com> Don't use NPP for connection handover.

Handover will only work with SNEP; if SNEP fails,
don't try with NPP.

Change-Id: Ib92c90cb588b99e177fa1c70b89753ef8d0e16ea
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
d82d9db81f30ccecd29a0531e6db9b49c9c2cd95 08-May-2012 Martijn Coenen <maco@google.com> Bluetooth Beam bug fixes, UX and i18n.

- Implemented handover select with carrier power state
- Delay OPP send if remote carrier is activating
- I18n for all handover components
- Cleanup old handover transfers

Bug: 6411485
Change-Id: I84aac3a7c7e703a1fcb423b6016cd9fa3d33d9b1
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
83558889207858d7ce8500f9fce8a707a86b495e 13-Apr-2012 Martijn Coenen <maco@google.com> Support for the new Uri[] Beam push API.

Support multiple URIs, move query for the mime type to NFC service.

Change-Id: Ib055efca843b41f6d29cda7d67b23f4b9946113c
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
43f2fa7ad4c72ef4849f2d2b78a963c1925c63a3 04-Apr-2012 Nick Pelly <npelly@google.com> First cut at Bluetooth Beam

Change-Id: I616fd57b7822d703280ec960b84cf8c5ced6719d
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
eec585407f2cfc47814f572a1e2a0f7d56b41451 02-Apr-2012 Martijn Coenen <maco@google.com> Allow applications to disable default Beam behavior.

By adding a meta-data entry to the application section of
the applications manifest:

<meta-data android:name="android.nfc.disable_beam_default"
android:value="true" />

Bug: 6257668
Change-Id: I73c27d8c642acd85f678fb42b4379f6bc21189b9
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
c96f982f8c0fa061701143a27395acf3b24dfb54 28-Mar-2012 Nick Pelly <npelly@google.com> Keep static NDEF in application rather than NFC Service.

This means we make an IPC callback during Beam for static NDEF, instead
of an IPC every time the static NDEF changes. This results in less IPC,
and the latency increase during Beam is not measurable.

This fixes a bug where a crashed application still leaves its
static NDEF message inside NFC service.

Bug: 5199662
Change-Id: Id4879356b2b2b0d65ce3183d7a1bda9cde455f2c
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
e3728e6676eff6c1c77ad89153d8814d94c79fbc 15-Mar-2012 Nick Pelly <npelly@google.com> Update URL from Market to Play. Add feature parameter.

Change-Id: Ie8d0f65f7055e8bdca1e2f3b322a5b9a280ea2d2
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
6e5a69a21f2a29e5e1d415bb788bbc1f576363f0 06-Mar-2012 Nick Pelly <npelly@google.com> Perform default Beam behavior from system apps.

1) Launch the app if its installed on the other device.
2) Lanch market with a search for the app if it is not installed.

Bug: 6091238
Change-Id: Ifc593f1f2ad120ef1b3b2e90ac157f99c0df5b16
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
fb42b9f2d905015730f2e12772ed9a2a610a3957 10-Feb-2012 Isaac Levy <ilevy@google.com> Allow apps to selectively disable beam

if apps register a callback but return 'null', do not create the
default message.

Fixes b/5943350

Change-Id: I247bb7d508c15777904599c3a211c30e81351f15
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
6f0e3b8e1de5137077127bf3144effa2016c27c6 17-Jan-2012 Martijn Coenen <maco@google.com> LLCP echo server implementation.

Can be used to test the Android LLCP stack with nfcpy. Disabled
by default.

Also fixed unnecessary JNI release call causing warnings in the
logs.

Change-Id: Iaed159e23dadc1601be2df2aadbe1d9c54c50615
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
416e2fc507d696486a127f932105b3b95519d0cb 11-Aug-2011 Jeff Hamilton <jham@android.com> Add event logs for NFC events.

Change-Id: I5607abe5d28ef9682afa084651c50aa651655b60
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
0b3b8ab69835cb66c96691dae3ba9b75705980a5 24-Aug-2011 Nick Pelly <npelly@google.com> NFC service updates for moving NDEF push to a fragment.

enable()/disable() -> set()
ZeroClick -> NdefPush

Change-Id: I21806665b8fd29e4580bd2e3200858d834605f6f
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
69ca6627125c91c44b9e0d8bfa5df83281c2ebe1 22-Aug-2011 Martijn Coenen <maco@google.com> NdefPush animations.

- Sound + vibration whenever devices enter range.
- Rebuilt old send animation - clone off in the background.
- Scale back up for receive, then call startActivity().
- Slowed down animations
- Split sending in two parts: first part is slow and played during
the actual send. When the send is done, the animation is accelerated
and finished. This has as an advantage that there is an immediate
response to the touch (instead of waiting till the send is done).
- Lock rotation.

TODO:
- Integrate firefly background.
- Touch to send hint.
- Tweak debounce time - somehow it still happens a lot
that the link is tore down, the debounce comes in, and
the link comes back up again just after 750ms, causing
flapping anyway.
- After a lot of tapping things seem to become very slow; I'm not
sure yet if this is due to NFC or other ICS code.
- See if we can really do without TYPE_SYSTEM_OVERLAY window params.

Change-Id: I93d472ed566b8201b65e9eee049467995f66e683
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
d2a536159030a932486e6dfd93999f9e43f3566f 18-Aug-2011 Martijn Coenen <maco@google.com> Latest ShareTap UI: low-pass filter and animations.

Change-Id: If0c04284e1e6f1126f85a8bb58014ce553f4e52b
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
8a558ba19be56e71e6c2015dea862d150e6d07cb 13-Aug-2011 Nick Pelly <npelly@google.com> Implement Tap-to-Share and Tilt-to-Share (DropShare).

o Text says "Tap to Share", but tilting (the phone on top sends) also works.
o Move text to top. Remove arrows.
o First Accelerometer value takes ~700ms :(
o Only call onP2pSendComplete on success. If the send failed, we retry quietly.
This improves perceived reliability.
o Reduce debounce from 1000ms to 750ms.

TODO
o Never do orientation change while in the animation activity
o Get rid of black transition when entering/leaivng activity
o Figure out why it takes 700ms to get first accelerometer value
o Improve launch time of animation activity (sometimes it takes 3+ seconds)
o Consider going back to a window overlay?
o Make it snappy snappy snappy

Change-Id: Idbc8e4bb744051b7b69d234a51a3ce69e23b699f
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java
77d0b56bfa6a4e4e1449c476a1141a7486f34ad9 11-Aug-2011 Nick Pelly <npelly@google.com> Decouple P2P link management from P2P UX management.

The goal is to make it easier to track the state of the P2P transfer, and
to make it easier to fine-tune UX (sound, vibration, animation) for P2P
transfer.

NdefP2pManager -> P2pLinkManager
It now only handles LLCP and NDEF logic (and no UX). It has a state machine to
track the state of the LLCP link, send and receive. It does debouncing on the
LLCP link. Events are surfaced to P2pEventManager through the P2pEventListener
interface.

P2pEventManager
Handles all UX (sound, vibration, animation) and send confirmation.
The current implementation uses Rotation to confirm send, and
P2pAnimationActivity to animate the send.

Change-Id: Ie498219857afe69403e90f09c77f4d6d1b24ffeb
/packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java