How to create a second instance of WindowManagerService on a separate process
182 views
Skip to first unread message
Android007
unread,
Oct 31, 2012, 8:11:50 AM10/31/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-...@googlegroups.com
Hi, I currently have a working platform that supports multiple screens. To do so, I have created an instance of the WindowManagerService per display. (This works fine except in some situations when a service needs to use the UI).
A nice solution would be to have each WindowManagerService running on a separate process. In other words, instead of instantiating "new WindowManagerService (...)" for each display, do something like:
new Process (..., uid = ..., ...., ) { run () { new WindowManagerService(...); } }
Is this possible in Java? Andriod? How can I do this?
Thank you,
eric liou
unread,
Oct 31, 2012, 9:56:22 AM10/31/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-...@googlegroups.com
> (This works fine except in some situations when a service needs to use the
> UI).
why it not work when a service needs to use the UI?
> A nice solution would be to have each WindowManagerService running on a
> separate process.
WindowManagerService is running in the system_server, maybe you can
running multiple system_server?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-...@googlegroups.com
a) Since I have more than one windowmanager on the same process , it is hard to decide which one should receive the drawing commands. When a service is drawing (services usually don't have a graphical interface) then it is hard to determine which windowmanager should be addressed.
b) Instantiating a second system_server can be very hard since many of the methods it calls should only be called once (many of the instances it creates shold only be instantiated once as well). I know that it is possible to create a process with Process.start, but then I need an Intent/application to run. I though about using bindService, but I am not sure how to do that to a WindowManager.