Bug 894454 - Avoid potential NullPointerException crashes in sutAgent; r=wlach

This commit is contained in:
Geoff Brown 2013-08-02 20:25:32 -07:00
Родитель da0711acb7
Коммит 6820a633a5
3 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -139,6 +139,10 @@ public class CmdWorkerThread extends Thread
SUTAgentAndroid.log(dc, message);
outputLine = dc.processCommand(inputLine, out, in, cmdOut);
if (outputLine == null)
{
outputLine = "";
}
if (outputLine.length() > 0)
{
out.print(outputLine + "\n" + prompt);

Просмотреть файл

@ -170,6 +170,10 @@ public class DataWorkerThread extends Thread
if ((inputLine += readLine(in)) != null)
{
outputLine = dc.processCommand(inputLine, out, in, cmdOut);
if (outputLine == null)
{
outputLine = "";
}
out.print(outputLine + "\n");
out.flush();
if (outputLine.equals("exit"))

Просмотреть файл

@ -107,7 +107,7 @@ public class DoCommand {
String ffxProvider = "org.mozilla.ffxcp";
String fenProvider = "org.mozilla.fencp";
private final String prgVersion = "SUTAgentAndroid Version 1.18";
private final String prgVersion = "SUTAgentAndroid Version 1.19";
public enum Command
{
@ -1396,7 +1396,7 @@ private void CancelNotification()
}
Log.e("SUTAgentAndroid", "ERROR: Cannot access world writeable test root");
return(null);
return sErrorPrefix + " unable to determine test root";
}
public String GetAppRoot(String AppName)