Index: build/android/pylib/uiautomator/test_runner.py |
diff --git a/build/android/pylib/uiautomator/test_runner.py b/build/android/pylib/uiautomator/test_runner.py |
index edb6dc93defd54e7fa6fe8d9f638550459cae051..100ba1d5fb0652444ffa6535c061237a67fc5e9f 100644 |
--- a/build/android/pylib/uiautomator/test_runner.py |
+++ b/build/android/pylib/uiautomator/test_runner.py |
@@ -54,10 +54,11 @@ class TestRunner(instr_test_runner.TestRunner): |
#override |
def _RunTest(self, test, timeout): |
self.adb.ClearApplicationState(self._package) |
- if 'Feature:FirstRunExperience' in self.test_pkg.GetTestAnnotations(test): |
- self.flags.RemoveFlags(['--disable-fre']) |
- else: |
- self.flags.AddFlags(['--disable-fre']) |
+ if self.flags: |
+ if 'Feature:FirstRunExperience' in self.test_pkg.GetTestAnnotations(test): |
+ self.flags.RemoveFlags(['--disable-fre']) |
+ else: |
+ self.flags.AddFlags(['--disable-fre']) |
self.adb.StartActivity(self._package, |
self._activity, |
wait_for_completion=True, |