shell.addListener(SWT.Close, new Listener() {
public void handleEvent(Event event) {
if (!mFinished) {
- Log.i("ddms", "NOT closing - cancelling command");
+ Log.d("ddms", "NOT closing - cancelling command");
event.doit = false;
mCancel = true;
}
PrefsDialog.getStore().setValue("lastTextSaveDir",
dlg.getFilterPath());
- Log.i("ddms", "Saving output to " + fileName);
+ Log.d("ddms", "Saving output to " + fileName);
/*
* Convert to 8-bit characters.
mMenu.setVisible(true);
} else {
// button clicked
- Log.i("ddms", mDropdown.getText() + " Pressed");
+ Log.d("ddms", mDropdown.getText() + " Pressed");
}
}
}
} else if (count == 0) {
// TODO: need more accurate timeout?
if (timeout != 0 && numWaits * WAIT_TIME > timeout) {
- Log.i("ddms", "read: timeout");
+ Log.d("ddms", "read: timeout");
throw new IOException("timeout");
}
// non-blocking spin
} else if (count == 0) {
// TODO: need more accurate timeout?
if (timeout != 0 && numWaits * WAIT_TIME > timeout) {
- Log.i("ddms", "write: timeout");
+ Log.d("ddms", "write: timeout");
throw new IOException("timeout");
}
// non-blocking spin
Debugger dbg = mDebugger;
if (dbg == null) {
- Log.i("ddms", "Discarding packet");
+ Log.d("ddms", "Discarding packet");
packet.consume();
} else {
dbg.sendAndConsume(packet);
//Log.v("ddms", "findHand: " + result);
switch (result) {
case JdwpPacket.HANDSHAKE_GOOD:
- Log.i("ddms",
+ Log.d("ddms",
"Good handshake from client, sending HELO to " + mClientData.getPid());
JdwpPacket.consumeHandshake(mReadBuffer);
mConnState = ST_NEED_DDM_PKT;
// see if we have another packet in the buffer
return getJdwpPacket();
case JdwpPacket.HANDSHAKE_BAD:
- Log.i("ddms", "Bad handshake from client");
+ Log.d("ddms", "Bad handshake from client");
if (MonitorThread.getInstance().getRetryOnBadHandshake()) {
// we should drop the client, but also attempt to reopen it.
// This is done by the DeviceMonitor.
}
break;
case JdwpPacket.HANDSHAKE_NOTYET:
- Log.i("ddms", "No handshake from client yet.");
+ Log.d("ddms", "No handshake from client yet.");
break;
default:
Log.e("ddms", "Unknown packet while waiting for client handshake");
*/
void packetFailed(JdwpPacket reply) {
if (mConnState == ST_NEED_DDM_PKT) {
- Log.i("ddms", "Marking " + this + " as non-DDM client");
+ Log.d("ddms", "Marking " + this + " as non-DDM client");
mConnState = ST_NOT_DDM;
} else if (mConnState != ST_NOT_DDM) {
Log.w("ddms", "WEIRD: got JDWP failure packet on DDM req");
* @param notify Whether or not to notify the listeners of a change.
*/
void close(boolean notify) {
- Log.i("ddms", "Closing " + this.toString());
+ Log.d("ddms", "Closing " + this.toString());
mOutstandingReqs.clear();
mPreDataBuffer = ByteBuffer.allocate(PRE_DATA_BUF_SIZE);
mConnState = ST_NOT_CONNECTED;
- Log.i("ddms", "Created: " + this.toString());
+ Log.d("ddms", "Created: " + this.toString());
}
/**
if (listenChan != null) {
SocketChannel newChan;
-
+
newChan = listenChan.accept();
if (mChannel != null) {
Log.w("ddms", "debugger already talking to " + mClient
mConnState = ST_AWAIT_SHAKE;
return mChannel;
}
-
+
return null;
}
//Log.v("ddms", "findHand: " + result);
switch (result) {
case JdwpPacket.HANDSHAKE_GOOD:
- Log.i("ddms", "Good handshake from debugger");
+ Log.d("ddms", "Good handshake from debugger");
JdwpPacket.consumeHandshake(mReadBuffer);
sendHandshake();
mConnState = ST_READY;
return getJdwpPacket();
case JdwpPacket.HANDSHAKE_BAD:
// not a debugger, throw an exception so we drop the line
- Log.i("ddms", "Bad handshake from debugger");
+ Log.d("ddms", "Bad handshake from debugger");
throw new IOException("bad handshake");
case JdwpPacket.HANDSHAKE_NOTYET:
break;
} else {
Log.e("ddms", "Receiving data in state = " + mConnState);
}
-
+
return null;
}
String packageFileName = getFileName(localFilePath);
String remoteFilePath = String.format("/data/local/tmp/%1$s", packageFileName); //$NON-NLS-1$
- Log.i(packageFileName, String.format("Uploading %1$s onto device '%2$s'",
+ Log.d(packageFileName, String.format("Uploading %1$s onto device '%2$s'",
packageFileName, getSerialNumber()));
SyncService sync = getSyncService();
if (sync != null) {
String message = String.format("Uploading file onto device '%1$s'",
getSerialNumber());
- Log.i(LOG_TAG, message);
+ Log.d(LOG_TAG, message);
SyncResult result = sync.pushFile(localFilePath, remoteFilePath,
SyncService.getNullProgressMonitor());
appNameLen = data.getInt();
appName = getString(data, appNameLen);
- Log.i("ddm-appname", "APNM: app='" + appName + "'");
+ Log.d("ddm-appname", "APNM: app='" + appName + "'");
ClientData cd = client.getClientData();
synchronized (cd) {
if (result == 0) {
handler.onSuccess(filename, client);
- Log.i("ddm-heap", "Heap dump request has finished");
+ Log.d("ddm-heap", "Heap dump request has finished");
} else {
handler.onFailure(client);
Log.w("ddm-heap", "Heap dump request failed (check device log)");
result = data.get();
if (result == 0) {
- Log.i("ddm-prof", "Method profiling has finished");
+ Log.d("ddm-prof", "Method profiling has finished");
} else {
Log.w("ddm-prof", "Method profiling has failed (check device log)");
}
result = data.get();
if (result == 0) {
- Log.i("ddm-prof", "Method profiling is not running");
+ Log.d("ddm-prof", "Method profiling is not running");
} else {
- Log.i("ddm-prof", "Method profiling is running");
+ Log.d("ddm-prof", "Method profiling is running");
}
}
}
if (threadInfo != null)
threadInfo.updateThread(status, tid, utime, stime, isDaemon);
else
- Log.i("ddms", "Thread with id=" + threadId + " not found");
+ Log.d("ddms", "Thread with id=" + threadId + " not found");
// slurp up any extra
for (int slurp = extraPerEntry; slurp > 0; slurp--)
data.get();
}
-
+
client.update(Client.CHANGE_THREAD_DATA);
}
threadInfo.setThreadName(name);
client.update(Client.CHANGE_THREAD_DATA);
} else {
- Log.i("ddms", "Thread with id=" + threadId + " not found");
+ Log.d("ddms", "Thread with id=" + threadId + " not found");
}
}
throws IOException {
if (false) {
- Log.i("ddm-thread", "would send STKL " + threadId);
+ Log.d("ddm-thread", "would send STKL " + threadId);
return;
}
try {
sendTHST(client);
} catch (IOException ioe) {
- Log.i("ddms", "Unable to request thread updates from "
+ Log.d("ddms", "Unable to request thread updates from "
+ client + ": " + ioe.getMessage());
} finally {
mThreadStatusReqRunning = false;
}.start();
}
}
-
+
static void requestThreadStackCallRefresh(final Client client, final int threadId) {
if (client.isDdmAware() && client.isThreadUpdateEnabled()) {
if (mThreadStackTraceReqRunning ) {
try {
sendSTKL(client, threadId);
} catch (IOException ioe) {
- Log.i("ddms", "Unable to request thread stack call updates from "
+ Log.d("ddms", "Unable to request thread stack call updates from "
+ client + ": " + ioe.getMessage());
} finally {
mThreadStackTraceReqRunning = false;
}
}.start();
}
-
+
}
/*
reason = data.get();
- Log.i("ddm-wait", "WAIT: reason=" + reason);
+ Log.d("ddm-wait", "WAIT: reason=" + reason);
ClientData cd = client.getClientData();
throw re;
}
} else {
- Log.i("ddms", "ignoring duplicate debugger");
+ Log.w("ddms", "ignoring duplicate debugger");
// new connection already closed
}
}
* this won't be necessary, and we can just send a "debugger
* disconnected" message.
*/
- Log.i("ddms", "Closing connection to debugger " + dbg);
+ Log.d("ddms", "Closing connection to debugger " + dbg);
dbg.closeData();
Client client = dbg.getClient();
if (client.isDdmAware()) {
// TODO: soft-disconnect DDM-aware clients
- Log.i("ddms", " (recycling client connection as well)");
+ Log.d("ddms", " (recycling client connection as well)");
// we should drop the client, but also attempt to reopen it.
// This is done by the DeviceMonitor.
client.getDeviceImpl().getMonitor().addClientToDropAndReopen(client,
IDebugPortProvider.NO_STATIC_PORT);
} else {
- Log.i("ddms", " (recycling client connection as well)");
+ Log.d("ddms", " (recycling client connection as well)");
// we should drop the client, but also attempt to reopen it.
// This is done by the DeviceMonitor.
client.getDeviceImpl().getMonitor().addClientToDropAndReopen(client,
Debugger dbg = mSelectedClient.getDebugger();
if (dbg != null) {
- Log.i("ddms", "Accepting connection on 'debug selected' port");
+ Log.d("ddms", "Accepting connection on 'debug selected' port");
try {
acceptNewDebugger(dbg, acceptChan);
} catch (IOException ioe) {
if (fileName != null) {
DdmUiPreferences.getStore().setValue("lastImageSaveDir", dlg.getFilterPath());
- Log.i("ddms", "Saving image to " + fileName);
+ Log.d("ddms", "Saving image to " + fileName);
ImageData imageData = mImageLabel.getImage().getImageData();
try {
int height = imageData.height;
byte[] out24;
- Log.i("ddms-png", "Convert to 24bit from " + imageData.depth);
+ Log.d("ddms-png", "Convert to 24bit from " + imageData.depth);
if (imageData.depth == 24 || imageData.depth == 32) {
out24 = convertTo24ForPng(imageData.data, width, height,