Closed Bug 1974148 Opened 1 year ago Closed 1 year ago

Media's key event is always dispatched to AudioManager

Categories

(GeckoView :: IME, defect)

All
Android
defect

Tracking

(firefox143 fixed)

RESOLVED FIXED
143 Branch
Tracking Status
firefox143 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

When Key event is dispatched to web content, if it isn't consumed (or content doesn't call preventDefault), we call AudioManager.dispatchMediaKeyEvent. But this doesn't work on e10s (GeckoView). When we don't have a focus to editable control, we will dispatch key event from chrome process. So we cannot recognize whether event is consumed.

So we need a way to how to recognize whether key event from chrome process is consumed, like GlobalKeyListener.

Severity: -- → S3
Assignee: nobody → m_kato

Originally, media keys were dispatched to AudioManager if web content
consumes it by bug 730192. But after GeckoView (moving to e10s),
we always call GeckoEditable.onDefaultKeyEvent() if focused element
isn't editable even if web content consumes it.

DispatchKeyboardEvent is asynchronous and it doesn't wait for
whether the event is consumed or not. Also, even if we set the flag for
"waiting reply from remote process", its flag will reset in
DispatchKeyboardEventInternal.

So I would like to inhibit this. Then if media key, we set the flag if
on parent process.

Attachment #9499668 - Attachment description: WIP: Bug 1974148 - Media keys on GeckoView aren't e10s-aware. r=masayuki!,#geckoview-reviewers! → Bug 1974148 - Media keys on GeckoView aren't e10s-aware. r=masayuki!,#geckoview-reviewers!
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: