Closed Bug 1172740 Opened 4 years ago Closed 4 years ago

[B2GDroid] Alarm menu is blank.

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(firefox44 fixed, b2g-master unaffected)

RESOLVED FIXED
FxOS-S9 (16Oct)
Tracking Status
firefox44 --- fixed
b2g-master --- unaffected

People

(Reporter: jthomas, Assigned: reuben)

References

()

Details

(Whiteboard: [3.0-Daily-Testing])

Attachments

(2 files, 5 obsolete files)

Description:
After opening the Clock app the menues for the Alarm tab will be blank. The Timer and Stopwatch tabs appear to working correctly.


Repro Steps:
1) Update to B2GDroid 20150608071805
2) Select Clock.
3) Select Alarm Tab.


Actual:
Alarm tab is blank.

Expected:
It is expected the user will be able to add and customize alarms with visible options.


Repro frequency: 100%.
Attachments: Logcat, Video
This issue does NOT occur on the Flame 3.0.

Result: User is able to view and select Alarms options successfully.

Environmental Variables:
Device: Flame 3.0 Kitkat Full Flash (319mb) 
Build ID: 20150608010204
Gaia: 1d62b32408567f9f7cf1c71c1e5a0c6593be757b
Gecko: 7d4ab4a9febd
Gonk: 040bb1e9ac8a5b6dd756fdd696aa37a8868b5c67
Version: 41.0a1 (3.0)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:41.0) Gecko/41.0 Firefox/41.0
Blocks: b2gdroid
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
Whiteboard: [3.0-Daily-Testing]
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
Assignee: nobody → reuben.bmo
Not rocket science :)
Right, but we don't have the hal support on android for the alarm api afaik.
Yeah, this will at least make it work for now with the fallback impl until we figure that out. (And would be needed anyway.)
What do you mean by "work"? will alarms fire?
Yes. Though I didn't test with very long alarms.
Attached patch HAL alarm for Android (obsolete) — Splinter Review
Attachment #8640224 - Attachment is obsolete: true
Attachment #8640825 - Attachment is obsolete: true
Attachment #8658493 - Flags: review?(snorp)
Duplicate of this bug: 1202864
Comment on attachment 8658493 [details] [diff] [review]
Implement Android HAL backend for alarms

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

::: widget/android/AndroidJNI.cpp
@@ +164,5 @@
>      NS_DispatchToMainThread(runnable);
>  }
>  
> +NS_EXPORT void JNICALL
> +Java_org_mozilla_gecko_GeckoAppShell_notifyAlarmFired(JNIEnv* jenv, jclass)

We're trying to avoid new calls here, and are actively moving existing things out. I think you should be able to handle the native call in AndroidAlarm.cpp. See ANRReporter.cpp/h for an example.
Attachment #8658493 - Flags: review?(snorp) → review-
Now using the GeneratedJNINatives stuff.
Attachment #8658493 - Attachment is obsolete: true
Attachment #8661358 - Flags: review?(snorp)
Comment on attachment 8661358 [details] [diff] [review]
Implement Android HAL backend for alarms, v2

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

Much nicer, but I think we can avoid the init call in nsAppShell. You should be able to do it in SetAlarm instead, since the Java side won't be calling the native side until that is completed.
Attachment #8661358 - Flags: review?(snorp) → review-
Seems like hal_impl::EnableAlarm is an even better place to do that. This ended up looking very clean.
Attachment #8661358 - Attachment is obsolete: true
Attachment #8662518 - Flags: review?(snorp)
Comment on attachment 8662518 [details] [diff] [review]
Implement Android HAL backend for alarms, v3

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

really nice, thanks
Attachment #8662518 - Flags: review?(snorp) → review+
I'm not going to land this just yet - while testing with longer lived alarms, sometimes the BroadcastReceiver's wake lock is not long enough for Gaia to receive the alarm notification, so we'll need to hold a lock ourselves.
With this we wake up the device and turn the screen on for long lived alarms. The only differences to v3 are the changes to AlarmReceiver.java. I couldn't create an interdiff because this newer one was rebased.
Attachment #8662518 - Attachment is obsolete: true
Attachment #8668258 - Flags: review?(snorp)
Attachment #8668258 - Flags: review?(snorp) → review+
https://hg.mozilla.org/mozilla-central/rev/b0b053cb93e5
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S9 (16Oct)
Duplicate of this bug: 1202899
You need to log in before you can comment on or make changes to this bug.