diff --git a/android/pylib/instrumentation/test_runner.py b/android/pylib/instrumentation/test_runner.py index d3add4e1f..e87de15b0 100644 --- a/android/pylib/instrumentation/test_runner.py +++ b/android/pylib/instrumentation/test_runner.py @@ -340,17 +340,16 @@ class TestRunner(base_test_runner.BaseTestRunner): duration_ms = int(time.time()) * 1000 - start_date_ms status_code = raw_result.GetStatusCode() if status_code: - result_type = base_test_result.ResultType.FAIL if self.options.screenshot_failures: self._TakeScreenshot(test) log = raw_result.GetFailureReason() if not log: log = 'No information.' - elif log.find('INJECT_EVENTS perm') >= 0: - package = self.adb.DismissCrashDialogIfNeeded() - # Assume test package convention of ".test" suffix - if package and package in self.test_pkg.GetPackageName(): - result_type = base_test_result.ResultType.CRASH + result_type = base_test_result.ResultType.FAIL + package = self.adb.DismissCrashDialogIfNeeded() + # Assume test package convention of ".test" suffix + if package and package in self.test_pkg.GetPackageName(): + result_type = base_test_result.ResultType.CRASH result = test_result.InstrumentationTestResult( test, result_type, start_date_ms, duration_ms, log=log) else: