自 2026 年起,为了与我们的主干稳定开发模型保持一致,并确保生态系统的平台稳定性,我们将在第 2 季度和第 4 季度向 AOSP 发布源代码。如需构建 AOSP 并为其贡献代码,请使用 android-latest-release。android-latest-release 清单分支将始终引用推送到 AOSP 的最新版本。如需了解详情,请参阅 AOSP 变更。
Google 会使用 AI 技术将内容翻译成您偏好的语言。AI 翻译可能包含错误。
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
EventsLoggerListener
public
class
EventsLoggerListener
extends Object
implements
ILogSaverListener
| java.lang.Object
|
| ↳ |
com.android.tradefed.result.EventsLoggerListener
|
将其收到的所有事件记录到文件中的监听器
摘要
公共方法 |
File
|
getLoggedEvents()
|
void
|
invocationEnded(long elapsedTime)
|
void
|
invocationFailed(FailureDescription failure)
|
void
|
invocationStarted(IInvocationContext context)
|
void
|
logAssociation(String dataName, LogFile logFile)
|
void
|
testAssumptionFailure(TestDescription test, String trace)
|
void
|
testAssumptionFailure(TestDescription test, FailureDescription failure)
|
void
|
testEnded(TestDescription test, long endTime, testMetrics)
|
void
|
testFailed(TestDescription test, FailureDescription failure)
|
void
|
testFailed(TestDescription test, String trace)
|
void
|
testIgnored(TestDescription test)
|
void
|
testModuleEnded()
|
void
|
testModuleStarted(IInvocationContext moduleContext)
|
void
|
testRunEnded(long elapsedTimeMillis, runMetrics)
|
void
|
testRunFailed(FailureDescription failure)
|
void
|
testRunFailed(String errorMessage)
|
void
|
testRunStarted(String runName, int testCount, int attemptNumber, long startTime)
|
void
|
testStarted(TestDescription test, long startTime)
|
公共构造函数
EventsLoggerListener
public EventsLoggerListener (String name)
公共方法
getLoggedEvents
public File getLoggedEvents ()
invocationEnded
public void invocationEnded (long elapsedTime)
invocationFailed
public void invocationFailed (FailureDescription failure)
| 参数 |
failure |
FailureDescription |
invocationStarted
public void invocationStarted (IInvocationContext context)
| 参数 |
context |
IInvocationContext |
logAssociation
public void logAssociation (String dataName,
LogFile logFile)
| 参数 |
dataName |
String |
logFile |
LogFile |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test,
String trace)
| 参数 |
test |
TestDescription |
trace |
String |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test,
FailureDescription failure)
| 参数 |
test |
TestDescription |
failure |
FailureDescription |
testEnded
public void testEnded (TestDescription test,
long endTime,
testMetrics)
| 参数 |
test |
TestDescription |
endTime |
long |
testMetrics |
|
testFailed
public void testFailed (TestDescription test,
FailureDescription failure)
| 参数 |
test |
TestDescription |
failure |
FailureDescription |
testFailed
public void testFailed (TestDescription test,
String trace)
| 参数 |
test |
TestDescription |
trace |
String |
testIgnored
public void testIgnored (TestDescription test)
testModuleEnded
public void testModuleEnded ()
testModuleStarted
public void testModuleStarted (IInvocationContext moduleContext)
| 参数 |
moduleContext |
IInvocationContext |
testRunEnded
public void testRunEnded (long elapsedTimeMillis,
runMetrics)
| 参数 |
elapsedTimeMillis |
long |
runMetrics |
|
testRunFailed
public void testRunFailed (FailureDescription failure)
| 参数 |
failure |
FailureDescription |
testRunFailed
public void testRunFailed (String errorMessage)
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber,
long startTime)
| 参数 |
runName |
String |
testCount |
int |
attemptNumber |
int |
startTime |
long |
testStarted
public void testStarted (TestDescription test,
long startTime)
| 参数 |
test |
TestDescription |
startTime |
long |
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-27。"],[],[]]