Closed
Bug 964672
Opened 11 years ago
Closed 11 years ago
Don't call Pair() before sendFile() otherwise pairing dialog will be shown
Categories
(Firefox OS Graveyard :: NFC, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: echou, Assigned: arno)
References
Details
Attachments
(1 file)
I was told that the pairing dialog would still be shown when using NFC to transfer videos. Just checked and realized it's because pair() is called in function doPairing() in nfc_handover_manager.js. For Gaia apps which want to send file via Bluetooth, sendFile() is the only method has to be called.
Updated•11 years ago
|
Attachment #8369707 -
Flags: review?(ehung)
Comment 2•11 years ago
|
||
(In reply to Eric Chou [:ericchou] [:echou] from comment #0)
> I was told that the pairing dialog would still be shown when using NFC to
> transfer videos. Just checked and realized it's because pair() is called in
> function doPairing() in nfc_handover_manager.js. For Gaia apps which want to
> send file via Bluetooth, sendFile() is the only method has to be called.
Does it mean in this stage, two devices have already paired?
Flags: needinfo?(arno)
(In reply to Evelyn Hung [:evelyn][:喵] from comment #2)
> (In reply to Eric Chou [:ericchou] [:echou] from comment #0)
> > I was told that the pairing dialog would still be shown when using NFC to
> > transfer videos. Just checked and realized it's because pair() is called in
> > function doPairing() in nfc_handover_manager.js. For Gaia apps which want to
> > send file via Bluetooth, sendFile() is the only method has to be called.
>
> Does it mean in this stage, two devices have already paired?
The way I understood Eric is that BluetoothTransfer.sendFile() does an implicit pairing so I should not pair for outgoing file transfers. Just to clarify: before calling BT.sendFile() the two devices are *not* paired. Eric: can you please say if my interpretation is correct?
Flags: needinfo?(arno) → needinfo?(echou)
Reporter | ||
Comment 4•11 years ago
|
||
(In reply to arno from comment #3)
> (In reply to Evelyn Hung [:evelyn][:喵] from comment #2)
> > (In reply to Eric Chou [:ericchou] [:echou] from comment #0)
> > > I was told that the pairing dialog would still be shown when using NFC to
> > > transfer videos. Just checked and realized it's because pair() is called in
> > > function doPairing() in nfc_handover_manager.js. For Gaia apps which want to
> > > send file via Bluetooth, sendFile() is the only method has to be called.
> >
> > Does it mean in this stage, two devices have already paired?
>
> The way I understood Eric is that BluetoothTransfer.sendFile() does an
> implicit pairing so I should not pair for outgoing file transfers. Just to
> clarify: before calling BT.sendFile() the two devices are *not* paired.
> Eric: can you please say if my interpretation is correct?
Correct. Calling Pair() only if you want to explicitly create a strong bond between two Bluetooth devices. In this case, an 'unauthenticated link key' would be created between two devices after SendFile() is called, even there's no PIN code request or user confirmation request sent to Gaia. However, the link key just created may be removed automatically once the whole file-sharing process completes.
Flags: needinfo?(echou)
Comment 5•11 years ago
|
||
Comment on attachment 8369707 [details]
Don't call Pair() before sendFile()
looks good to me. Thanks!
also thank Eric's explanation.
Attachment #8369707 -
Flags: review?(ehung) → review+
Comment 6•11 years ago
|
||
re-run CI, will merge it if travis green:
https://travis-ci.org/mozilla-b2g/gaia/builds/18164182
Comment 7•11 years ago
|
||
(In reply to Evelyn Hung [:evelyn][:喵] from comment #6)
> re-run CI, will merge it if travis green:
> https://travis-ci.org/mozilla-b2g/gaia/builds/18164182
tried several times but still failed, but I guess it's not your fault... Can you rebase to latest master build to trigger another CI round? Thanks.
Flags: needinfo?(arno)
Comment 8•11 years ago
|
||
merged into gaia master: https://github.com/mozilla-b2g/gaia/commit/66e0ddf60c3711432bba01875c60540cab3c0d93
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•