This has worked relatively well for us except when activities were 
involved where we had multiple foreground apps. Now the presence of the 
search bar (which is always visible for practical purposes) is also 
making this more complicated. 
The searchBar is part of the system app, but the search app window is not.

If system app does send the search window to background correctly when it is 
not invoked, is this still an issue?

I've given some thought about relying on explicit commands from the 
system app but it sounds to me as that would be effectively moving the 
priority assignment logic out of gecko and into gaia. Would that be a 
good thing? I think that information such as audio playback and wakelock 
control and system messages is not available there so that would need to 
be handled in gecko anyway. 
We are *highly* willing to move the audio competing policy from gecko to gaia…

because there is still something needs to be determined by system app but now 
in gecko we are handling it badly.

though even we have better setVisibile API() in 
https://bugzilla.mozilla.org/show_bug.cgi?id=1034001



I am not sure how difficulty about exposing the wake lock and system message,

but please note that system app is also playing an important role on these:

* Set mozPower attribute when wake-lock is got in screenManager

* Launch related apps required by system message event(open-app)

Visibility on the other hand might be better handled in the system app 
since it's aware of "external" connections between the app such as 
activity chains. Special-casing apps could also be done better in the 
system app (note that we recently had problems because the keyboard app 
changed an attribute name and the priority manager couldn't tell it 
apart from other apps anymore). 
For activity chaining, we are doing it by force all apps involved in the 
chaining to be foreground, and this is definitely not good.

Naturally we would need some kind of exposed API to allow the system app 
to communicate this information to Gecko. Maybe a basic set of 
priorities associated with an app. 
I was +1 to this idea from long time ago.

get/get Priority/Nice value…or something like that.



Thanks for bringing the priority management issue up.

Gabriele 

_______________________________________________ 
dev-b2g mailing list 
[email protected] 
https://lists.mozilla.org/listinfo/dev-b2g 
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to