[WebSMS] Android backend for createMessageCursor/createThreadCursor

RESOLVED FIXED in Firefox 44

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: reuben, Assigned: reuben)

Tracking

Trunk
mozilla44
Points:
---

Firefox Tracking Flags

(firefox43 affected, firefox44 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Comment hidden (empty)
(Assignee)

Comment 1

2 years ago
Created attachment 8662701 [details] [diff] [review]
Implement thread/message cursor API on Android

This patch:
- Moves all the WebSMS related native functions to use GeneratedNatives (SmsManager.h/cpp)
- Adapts the existing message list implementation in GeckoSmsManager to implement message cursors instead, and removes the old message list API
- Implements thread cursors

The SMS app successfully reads inbox threads and messages, but everything is read only so far (need to deal with whether we're the default SMS app or not in other bugs).

Missing things:
- widget/android/ is probably not the best place for SmsManager.h/cpp to live. Will move it to dom/mobilemessage/android.
- We start the SmsIoThread in a static code block in SmsManager.java, but it looks like that only runs when we first access the SmsManager class, so there's a race between initialization of the IO thread and the first Runnable to be posted. This needs to be fixed.

:snorp, do you see any obvious red flags here?
Attachment #8662701 - Flags: feedback?(snorp)
(Assignee)

Comment 2

2 years ago
Oh, and this probably won't build without MOZ_WEBSMS_BACKEND, but that's just because I was trying to avoid a clobber, it's a trivial fix.
(Assignee)

Comment 3

2 years ago
Created attachment 8668521 [details] [diff] [review]
Implement thread/message cursor API on Android

This fixes the race by using a HandlerThread and moves the code to dom/mobilemessage/android.
Attachment #8662701 - Attachment is obsolete: true
Attachment #8662701 - Flags: feedback?(snorp)
Attachment #8668521 - Flags: review?(snorp)
Attachment #8668521 - Flags: review?(snorp) → review+

Comment 4

2 years ago
https://hg.mozilla.org/integration/b2g-inbound/rev/3f9ca060b8d0
Backed out for android build failures: https://treeherder.mozilla.org/logviewer.html#?job_id=2962406&repo=b2g-inbound

https://hg.mozilla.org/integration/b2g-inbound/rev/40c5046a6651
Flags: needinfo?(reuben.bmo)

Comment 6

2 years ago
https://hg.mozilla.org/integration/b2g-inbound/rev/92a91d520488
(Assignee)

Comment 7

2 years ago
…I was running |make update-generated-wrappers| on the wrong objdir :/
Flags: needinfo?(reuben.bmo)
https://hg.mozilla.org/mozilla-central/rev/92a91d520488
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox44: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
(Assignee)

Updated

2 years ago
Duplicate of this bug: 862718
Duplicate of this bug: 1189893
You need to log in before you can comment on or make changes to this bug.