Closed Bug 909706 Opened 11 years ago Closed 11 years ago

Keyboard manager must wait for applicationready to enumerate all keyboard apps

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

Other
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:koi+)

RESOLVED FIXED
blocking-b2g koi+

People

(Reporter: GaryChen, Assigned: GaryChen)

References

Details

(Whiteboard: [FT:System-Platform], [Sprint:3])

Attachments

(2 files)

When Keyboard Manager runs init() keyboard helper(shared/js/keyboard_helper.js) will use |navigator.mozApps.mgmt.getAll()| for enumerating all keyboard apps.

We saw some code like system/js/bootstrap.js will wait for |Applications.ready| or listen |applicationready| event to prevent gecko not ready for |mozApps.mgmt| . 

Seems Keyboard manager need to wait for |applicationready| to run init().
Attached file WIP patch
Hi Alive and Rudy,
   This is my WIP patch.
   Is it right for listening |applicationready| before we do |mozApps.mgmt.getAll()|?
   
   In shared/js/keyboard_helper.js line145
   https://github.com/mpizza/gaia/commit/dd2079019149f5ac1c8d3ed9b47e28b1e64f10e7#L7R145

   please give me some feedback thanks.
Attachment #796108 - Flags: feedback?(rlu)
Attachment #796108 - Flags: feedback?(alive)
Comment on attachment 796108 [details]
WIP patch

Looks good to me.
Thanks for taking care of this.
Attachment #796108 - Flags: feedback?(rlu) → feedback+
Comment on attachment 796108 [details]
WIP patch

How about KeyboardHelper? It shouldn't do init() right away it's included. Or we shall lazy load it.
Attachment #796108 - Flags: feedback?(alive) → feedback+
good point~
Thanks Rudy and Alive

I will fix it.
blocking-b2g: --- → koi+
Whiteboard: [FT:System-Platform], [Sprint:3]
Hi Alive,
   I've update my patch and addressed your comment, please help review this patch.
   Thanks.
Attachment #798503 - Flags: review?(akuo)
Assignee: nobody → gchen
Blocks: 911737
Comment on attachment 798503 [details]
pull request: https://github.com/mozilla-b2g/gaia/pull/11886

r=me iff KeyboardManager doesn't depend on KeyboardHelper load status.
Attachment #798503 - Flags: review?(akuo) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: