Od 27 marca 2025 r. zalecamy używanie android-latest-release
zamiast aosp-main
do kompilowania i wspołtworzenia AOSP. Więcej informacji znajdziesz w artykule o zmianach w AOSP.
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
LogReceiver
public
class
LogReceiver
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.log.LogReceiver
|
Podsumowanie
Konstruktory publiczne
LogReceiver
public LogReceiver (ITestDevice device,
String cmd,
String desc)
Parametry |
device |
ITestDevice |
cmd |
String |
desc |
String |
LogReceiver
public LogReceiver (ITestDevice device,
String cmd,
String desc,
long logcat_size,
int delay_secs)
Parametry |
device |
ITestDevice |
cmd |
String |
desc |
String |
logcat_size |
long |
delay_secs |
int |
Metody publiczne
wyczyść
public void clear ()
getDescriptor
public String getDescriptor ()
rozpocznij
public void start ()
zatrzymaj
public void stop ()
Treść strony i umieszczone na niej fragmenty kodu podlegają licencjom opisanym w Licencji na treści. Java i OpenJDK są znakami towarowymi lub zastrzeżonymi znakami towarowymi należącymi do firmy Oracle lub jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-27 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-07-27 UTC."],[],[],null,["# LogReceiver\n===========\n\n\n`\npublic\n\n\nclass\nLogReceiver\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|--------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.log.LogReceiver |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nSummary\n-------\n\n| ### Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[LogReceiver](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#LogReceiver(com.android.tradefed.device.ITestDevice,%20java.lang.String,%20java.lang.String))`(`[ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html)` device, String cmd, String desc) ` |\n| ` `[LogReceiver](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#LogReceiver(com.android.tradefed.device.ITestDevice,%20java.lang.String,%20java.lang.String,%20long,%20int))`(`[ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html)` device, String cmd, String desc, long logcat_size, int delay_secs) ` |\n\n| ### Public methods ||\n|-----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` void` | ` `[clear](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#clear())`() ` |\n| ` `[InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | ` `[getData](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#getData())`() ` |\n| ` String` | ` `[getDescriptor](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#getDescriptor())`() ` |\n| ` `[InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | ` `[getLogcatData](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#getLogcatData(int))`(int maxBytes) ` |\n| ` void` | ` `[postLog](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#postLog(com.android.tradefed.result.ITestInvocationListener))`(`[ITestInvocationListener](../../../../../../reference/tradefed/com/android/tradefed/result/ITestInvocationListener.html)` listener) ` |\n| ` void` | ` `[start](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#start())`() ` |\n| ` void` | ` `[stop](../../../../../../reference/tradefed/com/android/tradefed/log/LogReceiver.html#stop())`() ` |\n\nPublic constructors\n-------------------\n\n### LogReceiver\n\n```\npublic LogReceiver (ITestDevice device, \n String cmd, \n String desc)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|----------------------|\n| `device` | `ITestDevice` \u003cbr /\u003e |\n| `cmd` | `String` \u003cbr /\u003e |\n| `desc` | `String` \u003cbr /\u003e |\n\n### LogReceiver\n\n```\npublic LogReceiver (ITestDevice device, \n String cmd, \n String desc, \n long logcat_size, \n int delay_secs)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------|----------------------|\n| `device` | `ITestDevice` \u003cbr /\u003e |\n| `cmd` | `String` \u003cbr /\u003e |\n| `desc` | `String` \u003cbr /\u003e |\n| `logcat_size` | `long` \u003cbr /\u003e |\n| `delay_secs` | `int` \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### clear\n\n```\npublic void clear ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### getData\n\n```\npublic InputStreamSource getData ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------|--------|\n| [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | \u003cbr /\u003e |\n\n### getDescriptor\n\n```\npublic String getDescriptor ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|----------|--------|\n| `String` | \u003cbr /\u003e |\n\n### getLogcatData\n\n```\npublic InputStreamSource getLogcatData (int maxBytes)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|--------------|\n| `maxBytes` | `int` \u003cbr /\u003e |\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------|--------|\n| [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | \u003cbr /\u003e |\n\n### postLog\n\n```\npublic void postLog (ITestInvocationListener listener)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|----------------------------------|\n| `listener` | `ITestInvocationListener` \u003cbr /\u003e |\n\n### start\n\n```\npublic void start ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### stop\n\n```\npublic void stop ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e"]]