[Battery][Otoro] Battery level stays at 0 if battery is unplugged (and stayed if replugged)

RESOLVED DUPLICATE of bug 844974

Status

()

Core
Hardware Abstraction Layer (HAL)
RESOLVED DUPLICATE of bug 844974
6 years ago
4 years ago

People

(Reporter: timdream, Unassigned)

Tracking

Trunk
All
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(blocking-basecamp:-)

Details

Respective Gaia issue:
https://github.com/mozilla-b2g/gaia/issues/2987

STR:

0. Turned on the device
1. Connect the device with USB, verify charging status on status bar
2. Remove the battery while the device stays on
3. Wait for a moment

Expected:

1. According to Battery API spec, on step (2) or (3) the level should jump to 1.0 as if the device is fully charged (and charging), since we are not differentiate that status with no-battery status.

Actual:

1. Level jumps to 0, and start to charging a non-exist phantom battery.
2. Re-plugged in the battery will not resume the correct battery indication.
blocking-basecamp: --- → ?
GonkHal.cpp never checks if there is actually a battery.
If there is no battery, we should return { level=1.0; charging=true, remainingTime=kUnknownRemainingTime }.
Component: DOM: Device Interfaces → Hardware Abstraction Layer (HAL)
OS: Mac OS X → Gonk
Hardware: x86 → All
blocking-basecamp: ? → -
I'm doing some cleanup in the HAL component. I'm DUP'ing this as bug 844974 has a WIP patch that might or might not work provided we find the proper hardware to test.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 844974
You need to log in before you can comment on or make changes to this bug.