ViewManagerpublic class ViewManager extends Object
Methods Summary |
---|
public static void | invalidate(com.android.ddmlib.Device device, com.android.hierarchyviewer.device.Window window, java.lang.String params)
sendCommand("INVALIDATE", device, window, params);
| public static void | requestLayout(com.android.ddmlib.Device device, com.android.hierarchyviewer.device.Window window, java.lang.String params)
sendCommand("REQUEST_LAYOUT", device, window, params);
| private static void | sendCommand(java.lang.String command, com.android.ddmlib.Device device, com.android.hierarchyviewer.device.Window window, java.lang.String params)
Socket socket = null;
BufferedWriter out = null;
try {
socket = new Socket();
socket.connect(new InetSocketAddress("127.0.0.1",
DeviceBridge.getDeviceLocalPort(device)));
out = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
out.write(command + " " + window.encode() + " " + params);
out.newLine();
out.flush();
} catch (IOException e) {
// Empty
} finally {
try {
if (out != null) {
out.close();
}
if (socket != null) {
socket.close();
}
} catch (IOException ex) {
ex.printStackTrace();
}
}
|
|