Bug 614173 - Android agent needs a more robust way to pull files pt 2, also make ini reading more bulletproof r=ctalbert, a=NPOTB

This commit is contained in:
Bob Moss 2010-12-16 15:28:35 -08:00
Родитель 5a0f32c875
Коммит d1c77c89f2
2 изменённых файлов: 5 добавлений и 7 удалений

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

@ -123,7 +123,7 @@ public class DoCommand {
String sErrorPrefix = "##AGENT-WARNING## "; String sErrorPrefix = "##AGENT-WARNING## ";
boolean bTraceOn = false; boolean bTraceOn = false;
private final String prgVersion = "SUTAgentAndroid Version 0.93"; private final String prgVersion = "SUTAgentAndroid Version 0.94";
public enum Command public enum Command
{ {
@ -2376,7 +2376,8 @@ public class DoCommand {
temp = sLine.split("="); temp = sLine.split("=");
if (temp != null) if (temp != null)
{ {
sRet = temp[1].trim(); if (temp.length > 1)
sRet = temp[1].trim();
} }
break; break;
} }

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

@ -67,6 +67,7 @@ import android.net.wifi.WifiManager;
import android.net.wifi.WifiManager.WifiLock; import android.net.wifi.WifiManager.WifiLock;
import android.os.BatteryManager; import android.os.BatteryManager;
import android.os.Bundle; import android.os.Bundle;
import android.os.Debug;
import android.os.PowerManager; import android.os.PowerManager;
import android.telephony.TelephonyManager; import android.telephony.TelephonyManager;
import android.util.Log; import android.util.Log;
@ -106,8 +107,6 @@ public class SUTAgentAndroid extends Activity
private BroadcastReceiver battReceiver = null; private BroadcastReceiver battReceiver = null;
IWatcherService mService = null;
public boolean onCreateOptionsMenu(Menu menu) public boolean onCreateOptionsMenu(Menu menu)
{ {
mExitMenuItem = menu.add("Exit"); mExitMenuItem = menu.add("Exit");
@ -137,8 +136,6 @@ public class SUTAgentAndroid extends Activity
setContentView(R.layout.main); setContentView(R.layout.main);
// Debug.waitForDebugger();
// Keep phone from locking or remove lock on screen // Keep phone from locking or remove lock on screen
KeyguardManager km = (KeyguardManager)getSystemService(Context.KEYGUARD_SERVICE); KeyguardManager km = (KeyguardManager)getSystemService(Context.KEYGUARD_SERVICE);
if (km != null) if (km != null)
@ -722,4 +719,4 @@ public class SUTAgentAndroid extends Activity
} }
}; };
*/ */
} }