Android: Fix debugging.

When re-install a package without uninstalling it first, a few files
are leftover from the previous installation which makes the debugging to
fail.

Change-Id: I603491668bcec2a6f8054951ea2dea806fcc4c88
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
bb10
BogDan Vatra 2014-08-01 10:53:33 +03:00
parent 1fec23f927
commit a2ad0ba630
1 changed files with 7 additions and 0 deletions

View File

@ -542,6 +542,11 @@ public class QtActivityDelegate
int timeOut = 30000; // ms until we give up on ping and pong
int maxAttempts = timeOut / napTime;
if (gdbserverSocket != null) {
debugLog("removing gdb socket " + gdbserverSocket);
new File(gdbserverSocket).delete();
}
if (usePing) {
debugLog("removing ping file " + pingFile);
File ping = new File(pingFile);
@ -616,6 +621,8 @@ public class QtActivityDelegate
debugLog("go to sleep");
Thread.sleep(napTime);
}
debugLog("Removing pingFile " + pingFile);
new File(pingFile).delete();
if (i == maxAttempts) {
debugLog("time out when waiting for pong file");