Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Basic battery status and charging #56

Merged
merged 1 commit into from Jun 30, 2016
Merged

Conversation

lissyx
Copy link

@lissyx lissyx commented Jun 27, 2016

No description provided.

@lissyx lissyx mentioned this pull request Jun 27, 2016
console.debug('Adding event handler', key, 'to', hdl);
this._bm.addEventListener(key, this[hdl].bind(this));
});
setTimeout(() => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we wait this second?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To update the current status, without doing it during the start()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any event we can wait for instead of an specific time?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove the time itself and make it setTimeout(() => ...);, but there was no event that I could find from BatteryManager.

MozReview-Commit-ID: EXJ2iAomsfd
@lissyx lissyx merged commit b548920 into mozilla-b2g:pine Jun 30, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants