Don't enable USB Tethering UI for monkeys.

If the monkeys turn on USB tethering they kill their usb connection
and we lose the results of the run. Fix it by not showing that UI
during monkey runs.

bug:2679627
Change-Id: I7bb476a2d60c97dc9d3922d317fdcb586d0c7aec
This commit is contained in:
Robert Greenwalt
2010-06-16 16:10:01 -07:00
parent fa3384898a
commit ad40f5e917

View File

@@ -86,7 +86,7 @@ public class TetherSettings extends PreferenceActivity {
(ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
mUsbRegexs = cm.getTetherableUsbRegexs(); mUsbRegexs = cm.getTetherableUsbRegexs();
if (mUsbRegexs.length == 0) { if (mUsbRegexs.length == 0 || Utils.isMonkeyRunning()) {
getPreferenceScreen().removePreference(mUsbTether); getPreferenceScreen().removePreference(mUsbTether);
setTitle(R.string.tether_settings_title_wifi); setTitle(R.string.tether_settings_title_wifi);