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
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
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 received this message because you are subscribed to the Google Groups
> "android-platform" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/android-platform/-/srjnBhWNRrUJ.
> To post to this group, send email to android-...@googlegroups.com.
> To unsubscribe from this group, send email to
> android-platfo...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/android-platform?hl=en.

Android007

unread,
Nov 1, 2012, 6:22:08 AM11/1/12
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.
Reply all
Reply to author
Forward
0 new messages