Hi everyone,
I read the source code of hierarchyviewer and core Android to find out
how hierarchyView retrieve application infos. With the result, the
hierarchyviewer send a command "DUMP" or "LIST" to ViewServer that run
a SocketServer on port 4939. When the server receive the DUMP command,
it processes the command with these line of code :
***************************************************
        Parcel data = null;
        Parcel reply = null;

            int index = parameters.indexOf(' ');
            if (index == -1) {
                index = parameters.length();
            }
            final String code = parameters.substring(0, index);
            int hashCode = "ffffffff".equals(code) ? -1 :
Integer.parseInt(code, 16);

            // Extract the command's parameter after the window
description
            if (index < parameters.length()) {
                parameters = parameters.substring(index + 1);
            } else {
                parameters = "";
            }

            final WindowManagerService.WindowState window = findWindow
(hashCode);
            if (window == null) {
                return false;
            }

            data = Parcel.obtain();
            data.writeInterfaceToken("android.view.IWindow");
            data.writeString(command);
            data.writeString(parameters);
            data.writeInt(1);
            ParcelFileDescriptor.fromSocket(client).writeToParcel
(data, 0);

            reply = Parcel.obtain();

            final IBinder binder = window.mClient.asBinder();

            binder.transact(IBinder.FIRST_CALL_TRANSACTION, data,
reply, 0);

            reply.readException();

**************************************************

I'm very please if anyone can explain me what is done with Parcel
object and how to retrieve the WindowState info or do the same thing
to retrieve the information of running window ???

p.s : you can see these line of code in the file base/services/java/
com/android/server/WindowManagerService.java


--~--~---------~--~----~------------~-------~--~----~
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