Hello everyone,

I'm researching into the Android graphics and am having problems with
the following scenario:
1. In process A I inherit /SurfaceView/, implement /
SurfaceHolder.Callback/ and override its surfaceCreated() method.
2. Meanwhile I have another process B registering as a binder service
3. When /surfaceCreated(SurfaceHolder holder)/ gets called I extract
the surface from the SurfaceHolder, and pass it to the binder service,
in the remote process.
4. I read the process using /surface->readFromParcel()/

At this point, *in the emulator*, the surface I get in process B is
valid, and I manage to write to the screen just fine.
However, when running this on the device I still get that /surface-
>isValid() == true/, but cannot get a /surface->lock()/. Instead, when
attempting to lock(), Iogcat/ddms shows a "cannot map BpMemoryHeap"
error with EINVAL, and some fd value.

I'm guessing that somehow an fd mapped by the surface's heap is
invalidated when passing the surface via binder,
and that this somehow works in the emulator, since it works with
threads, and not real processes.


Any help would be most appreciated
Thanks,
Mick Halsband

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to