Methods Summary |
---|
void | addClient(com.android.ddmlib.Client client)
synchronized (mClients) {
mClients.add(client);
}
|
void | addProperty(java.lang.String label, java.lang.String value)
mProperties.put(label, value);
|
void | clearClientList()
synchronized (mClients) {
mClients.clear();
}
|
public boolean | createForward(int localPort, int remotePort)
try {
return AdbHelper.createForward(AndroidDebugBridge.sSocketAddr, this,
localPort, remotePort);
} catch (IOException e) {
Log.e("adb-forward", e); //$NON-NLS-1$
return false;
}
|
public void | executeShellCommand(java.lang.String command, IShellOutputReceiver receiver)
AdbHelper.executeRemoteCommand(AndroidDebugBridge.sSocketAddr, command, this,
receiver);
|
public java.lang.String | getAvdName()
return mAvdName;
|
public com.android.ddmlib.Client | getClient(java.lang.String applicationName)
synchronized (mClients) {
for (Client c : mClients) {
if (applicationName.equals(c.getClientData().getClientDescription())) {
return c;
}
}
}
return null;
|
java.util.List | getClientList()
return mClients;
|
java.nio.channels.SocketChannel | getClientMonitoringSocket()Returns the client monitoring socket.
return mSocketChannel;
|
public java.lang.String | getClientName(int pid)
synchronized (mClients) {
for (Client c : mClients) {
if (c.getClientData().getPid() == pid) {
return c.getClientData().getClientDescription();
}
}
}
return null;
|
public com.android.ddmlib.Client[] | getClients()
synchronized (mClients) {
return mClients.toArray(new Client[mClients.size()]);
}
|
public FileListingService | getFileListingService()
return new FileListingService(this);
|
DeviceMonitor | getMonitor()
return mMonitor;
|
public java.util.Map | getProperties()
return Collections.unmodifiableMap(mProperties);
|
public java.lang.String | getProperty(java.lang.String name)
return mProperties.get(name);
|
public int | getPropertyCount()
return mProperties.size();
|
public RawImage | getScreenshot()
return AdbHelper.getFrameBuffer(AndroidDebugBridge.sSocketAddr, this);
|
public java.lang.String | getSerialNumber()
/*
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getSerialNumber()
*/
return serialNumber;
|
public com.android.ddmlib.Device$DeviceState | getState()
return state;
|
public SyncService | getSyncService()
SyncService syncService = new SyncService(AndroidDebugBridge.sSocketAddr, this);
if (syncService.openSync()) {
return syncService;
}
return null;
|
boolean | hasClient(int pid)
synchronized (mClients) {
for (Client client : mClients) {
if (client.getClientData().getPid() == pid) {
return true;
}
}
}
return false;
|
public boolean | hasClients()
return mClients.size() > 0;
|
public boolean | isBootLoader()
return state == DeviceState.BOOTLOADER;
|
public boolean | isEmulator()
return serialNumber.matches(RE_EMULATOR_SN);
|
public boolean | isOffline()
return state == DeviceState.OFFLINE;
|
public boolean | isOnline()
return state == DeviceState.ONLINE;
|
void | removeClient(com.android.ddmlib.Client client, boolean notify)Removes a {@link Client} from the list.
mMonitor.addPortToAvailableList(client.getDebuggerListenPort());
synchronized (mClients) {
mClients.remove(client);
}
if (notify) {
mMonitor.getServer().deviceChanged(this, CHANGE_CLIENT_LIST);
}
|
public boolean | removeForward(int localPort, int remotePort)
try {
return AdbHelper.removeForward(AndroidDebugBridge.sSocketAddr, this,
localPort, remotePort);
} catch (IOException e) {
Log.e("adb-remove-forward", e); //$NON-NLS-1$
return false;
}
|
public void | runEventLogService(com.android.ddmlib.log.LogReceiver receiver)
AdbHelper.runEventLogService(AndroidDebugBridge.sSocketAddr, this, receiver);
|
public void | runLogService(java.lang.String logname, com.android.ddmlib.log.LogReceiver receiver)
AdbHelper.runLogService(AndroidDebugBridge.sSocketAddr, this, logname, receiver);
|
void | setClientMonitoringSocket(java.nio.channels.SocketChannel socketChannel)Sets the client monitoring socket.
mSocketChannel = socketChannel;
|
public java.lang.String | toString()
return serialNumber;
|
void | update(int changeMask)
mMonitor.getServer().deviceChanged(this, changeMask);
|
void | update(com.android.ddmlib.Client client, int changeMask)
mMonitor.getServer().clientChanged(client, changeMask);
|