[MAP] Handle MAP replies from Gaia and pass the results to BluetoothMapSmsManager

RESOLVED FIXED in Firefox 44, Firefox OS v2.2r

Status

Firefox OS
Bluetooth
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: shawnjohnjr, Assigned: shawnjohnjr)

Tracking

unspecified
FxOS-S9 (16Oct)
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(feature-b2g:2.2r+, firefox44 fixed, b2g-v2.2r fixed)

Details

Attachments

(4 attachments, 7 obsolete attachments)

41.82 KB, patch
Details | Diff | Splinter Review
6.79 KB, patch
Details | Diff | Splinter Review
42.16 KB, patch
Details | Diff | Splinter Review
4.01 KB, patch
Ben Tian (inactive)
: review+
Details | Diff | Splinter Review
Handle MAP replies from Gaia and pass the results to BluetoothMapSmsManager
Depends on: 1184017
Blocks: 1141954
See Also: → bug 1180555
Assignee: nobody → shuang
Attachment #8669498 - Attachment is obsolete: true
Attachment #8669676 - Attachment is obsolete: true
Blocks: 1211769
Hi Wesley,
Please nominate this bug as 2.2r feature.
Flags: needinfo?(whuang)
feature-b2g: --- → 2.2r+
Flags: needinfo?(whuang)
Attachment #8669700 - Attachment is obsolete: true
Attachment #8670782 - Attachment is obsolete: true
Created attachment 8670821 [details] [diff] [review]
Bug 1208492 - Handle MAP replies from Gaia and pass the results to BluetoothMapSmsManager
Attachment #8670821 - Flags: review?(btian)
Attachment #8670821 - Attachment is obsolete: true
Attachment #8670821 - Flags: review?(btian)
Created attachment 8671380 [details] [diff] [review]
Bug 1208492 - Handle MAP replies from Gaia and pass the results to BluetoothMapSmsManager

Change BluetoothMapRequestHandle from DOMRequest to Promise.
Attachment #8671380 - Attachment is obsolete: true
Created attachment 8671390 [details] [diff] [review]
Bug 1208492 - Handle MAP replies from Gaia and pass the results to BluetoothMapSmsManager
Attachment #8671390 - Flags: review?(btian)

Comment 9

3 years ago
Comment on attachment 8671390 [details] [diff] [review]
Bug 1208492 - Handle MAP replies from Gaia and pass the results to BluetoothMapSmsManager

Review of attachment 8671390 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with comment addressed.

::: dom/bluetooth/bluedroid/BluetoothMapSmsManager.h
@@ +85,5 @@
>    // By defualt SMS/MMS is default supported
>    static const int SDP_SMS_MMS_INSTANCE_ID = 0;
>  
>    static BluetoothMapSmsManager* Get();
>    bool Listen();

nit: newline after this line

@@ +100,5 @@
> +
> +  /**
> +   * Reply message-listing object to the *IPC* 'messageslisting'
> +   *
> +   * @param aActor [in]          a blob actor containing the vCard objects

bMessage objects

@@ +104,5 @@
> +   * @param aActor [in]          a blob actor containing the vCard objects
> +   * @param aMasId [in]          MAS id
> +   * @param aNewMessage [in]     indicate whether there are unread messages
> +   * @param aTimestamp [in]      time stamp
> +   * @param aSize [in]           total numbers of messages

total number

@@ +116,5 @@
> +
> +  /**
> +   * Reply messages-listing object to the *in-process* 'messageslisting' request
> +   *
> +   * @param aBlob [in]           a blob contained the vCard objects

containing the bMessage objects

@@ +120,5 @@
> +   * @param aBlob [in]           a blob contained the vCard objects
> +   * @param aMasId [in]          MAS id
> +   * @param aNewMessage [in]     indicate whether there are unread messages
> +   * @param aTimestamp [in]      time stamp
> +   * @param aSize [in]           total numbers of messages

total number

@@ +133,5 @@
> +  /**
> +   * Reply bMessage object to the *IPC* 'getmessage' request.
> +   *
> +   * @param aActor [in]          a blob actor containing the bMessage object
> +   * @param aMasId [in]          the number of vCard indexes in the blob

bMessage indexes

@@ +143,5 @@
> +
> +  /**
> +   * Reply bMessage to the *in-process* 'getmessage' request.
> +   *
> +   * @param aBlob [in]          a blob contained the bMessage object

containing

@@ +144,5 @@
> +  /**
> +   * Reply bMessage to the *in-process* 'getmessage' request.
> +   *
> +   * @param aBlob [in]          a blob contained the bMessage object
> +   * @param aMasId [in]         the number of vCard indexes in the blob

bMessage indexes.

@@ +155,5 @@
> +  /**
> +   * Reply to the *IPC* 'setmessage' request.
> +   *
> +   * @param aMasId [in]         MAS id
> +   * @param aStatus [in]        success or fail

nit: failure, to be both nouns

@@ +166,5 @@
> +  /**
> +   * Reply to the *in-process* 'sendmessage' request.
> +   *
> +   * @param aMasId [in]         MAS id
> +   * @param aStatus [in]        success or fail

failure

@@ +177,5 @@
> +  /**
> +   * Reply to the *in-process* 'messageupdate' request.
> +   *
> +   * @param aMasId [in]         MAS id
> +   * @param aStatus [in]        success or fail

failure

::: dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp
@@ +1726,5 @@
> +  long aMasId,
> +  const nsAString& aFolderlists,
> +  BluetoothReplyRunnable* aRunnable)
> +{
> +// TODO: Implement for future Email support

nit: indention

::: dom/bluetooth/bluedroid/BluetoothServiceBluedroid.h
@@ +216,5 @@
> +                             bool aStatus,
> +                             BluetoothReplyRunnable* aRunnable);
> +
> +  virtual void
> +  ReplyToMapSendMessage(long aMasId, bool aStatus,

nit: to be consistent, break these parameters to two lines.

@@ +220,5 @@
> +  ReplyToMapSendMessage(long aMasId, bool aStatus,
> +                        BluetoothReplyRunnable* aRunnable);
> +
> +  virtual void
> +  ReplyToMapMessageUpdate(long aMasId, bool aStatus,

Ditto.

::: dom/bluetooth/bluez/BluetoothDBusService.h
@@ +185,5 @@
>  
>    virtual void
>    ReplyTovCardListing(Blob* aBlob,
>                        uint16_t aPhonebookSize,
> +                      BluetoothReplyRunnable* aRunnable) override;

nit: newline after this line.

::: dom/bluetooth/common/BluetoothService.h
@@ +379,5 @@
> +                             bool aStatus,
> +                             BluetoothReplyRunnable* aRunnable) = 0;
> +
> +  virtual void
> +  ReplyToMapSendMessage(long aMasId, bool aStatus,

nit: to be consistent, break these parameters to two lines.

@@ +383,5 @@
> +  ReplyToMapSendMessage(long aMasId, bool aStatus,
> +                        BluetoothReplyRunnable* aRunnable) = 0;
> +
> +  virtual void
> +  ReplyToMapMessageUpdate(long aMasId, bool aStatus,

Ditto.

::: dom/bluetooth/ipc/BluetoothServiceChildProcess.h
@@ +186,5 @@
>  
>    virtual void
>    ReplyTovCardListing(Blob* aBlob,
>                        uint16_t aPhonebookSize,
>                        BluetoothReplyRunnable* aRunnable) override;

nit: newline after this line.

@@ +226,5 @@
> +                             bool aStatus,
> +                             BluetoothReplyRunnable* aRunnable) override;
> +
> +  virtual void
> +  ReplyToMapSendMessage(long aMasId, bool aStatus,

nit: to be consistent, break these parameters to two lines.

@@ +230,5 @@
> +  ReplyToMapSendMessage(long aMasId, bool aStatus,
> +                        BluetoothReplyRunnable* aRunnable) override;
> +
> +  virtual void
> +  ReplyToMapMessageUpdate(long aMasId, bool aStatus,

Ditto.
Attachment #8671390 - Flags: review?(btian) → review+
Attachment #8671390 - Attachment is obsolete: true
Created attachment 8672487 [details] [diff] [review]
Bug 1208492 - Handle MAP replies from Gaia and pass the results to BluetoothMapSmsManager, r=btian

Comment 14

3 years ago
bugherdermerge
https://hg.mozilla.org/mozilla-central/rev/96508aad02d1
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox44: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S9 (16Oct)
status-b2g-v2.2r: --- → affected
Sigh! v2.2r doesn't support BluetoothVoidReplyRunnable with Promise. Damn it. Since Bug 1184017 landed to v2.2r. I guess adding Promise support would be easier for future life.
Set ni flag to prepare v2.2r patch.
Flags: needinfo?(shuang)
shawn this still need a patch :)
Need to back port: Bug 1032755, bug 1016196.
Flags: needinfo?(shuang)
Created attachment 8678127 [details] [diff] [review]
Bug 1208492 - backport Bug 1016196: Add Promise support in BluetoothReplyRunnable, r=btian (v2.2r)
Created attachment 8678129 [details] [diff] [review]
Bug 1208492 - Handle MAP replies from Gaia and pass the results to BluetoothMapSmsManager, r=btian (v2.2r)
(In reply to Shawn Huang [:shawnjohnjr] from comment #18)
> Need to back port: Bug 1032755, bug 1016196.

After checking the dependency, only the patch of bug 1016196 is required.
(In reply to Carsten Book [:Tomcat] from comment #17)
> shawn this still need a patch :)
I've resolved the dependency. Please help to uplift.
Flags: needinfo?(cbook)
(In reply to Shawn Huang [:shawnjohnjr] from comment #22)
> (In reply to Carsten Book [:Tomcat] from comment #17)
> > shawn this still need a patch :)
> I've resolved the dependency. Please help to uplift.

sorry anytime Shawn! Landed:

https://hg.mozilla.org/releases/mozilla-b2g37_v2_2r/rev/7c1770e79d78
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2r/rev/8175f99236d0
status-b2g-v2.2r: affected → fixed
Flags: needinfo?(cbook)
(In reply to Carsten Book [:Tomcat] from comment #23)
> (In reply to Shawn Huang [:shawnjohnjr] from comment #22)
> > (In reply to Carsten Book [:Tomcat] from comment #17)
> > > shawn this still need a patch :)
> > I've resolved the dependency. Please help to uplift.
> 
> sorry anytime Shawn! Landed:
> 
> https://hg.mozilla.org/releases/mozilla-b2g37_v2_2r/rev/7c1770e79d78
> https://hg.mozilla.org/releases/mozilla-b2g37_v2_2r/rev/8175f99236d0

This appears to have broken ICS builds on 2.2r: https://treeherder.mozilla.org/logviewer.html#?job_id=11606&repo=mozilla-b2g37_v2_2r
Flags: needinfo?(shuang)
Created attachment 8679327 [details] [diff] [review]
Bug 1208492 - Fix ICS emulator build break (v2.2r)
Flags: needinfo?(shuang)
Attachment #8679327 - Flags: review?(btian)

Comment 26

3 years ago
Comment on attachment 8679327 [details] [diff] [review]
Bug 1208492 - Fix ICS emulator build break (v2.2r)

Review of attachment 8679327 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM.
Attachment #8679327 - Flags: review?(btian) → review+
Flags: needinfo?(wkocher)
You need to log in before you can comment on or make changes to this bug.