[gonk-l] During constructing, MediaCodec always waits for 'batterystats' service for 5 seconds before giving up.

RESOLVED FIXED in Firefox OS v2.2

Status

Firefox OS
General
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jolin, Assigned: jolin)

Tracking

unspecified
2.2 S4 (23jan)
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(b2g-v2.2 fixed, b2g-master fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
This behavior is problematic on B2G because that service is not available there.
(Assignee)

Comment 1

3 years ago
Created attachment 8547444 [details] [review]
Replace getService() with checkService().

getService() could wait up to 5 seconds when service is not available [1]; OTOH, checkService() returns immediately.
Other approaches to address this problem:
a. implement a dummy service. I wouldn't recommend this because it adds some run-time overheads, or
b. implement a  service that really works, if we want to monitor audio/video power usage.

[1] https://android.googlesource.com/platform/frameworks/native/+/master/libs/binder/IServiceManager.cpp#137
Attachment #8547444 - Flags: review?(sotaro.ikeda.g)
Comment on attachment 8547444 [details] [review]
Replace getService() with checkService().

Looks good.
Attachment #8547444 - Flags: review?(sotaro.ikeda.g) → review+
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
b2g-5.0.0_r6: https://github.com/mozilla-b2g/platform_frameworks_av/commit/ea531874885eed7f68802048218ed86dde927f58
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-b2g-v2.2: --- → fixed
status-b2g-master: --- → fixed
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S4 (23jan)
You need to log in before you can comment on or make changes to this bug.