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.
ILogcatReceiver
public
interface
ILogcatReceiver
com.android.tradefed.device.ILogcatReceiver
|
Klasa, która udostępnia dane wyjściowe logcat urządzenia jako InputStreamSource
.
Podsumowanie
Metody publiczne
wyczyść
public abstract void clear ()
getLogcatData
public InputStreamSource getLogcatData (int maxBytes,
int offset)
Zwraca bieżący bufor logcat dla podanego przesunięcia.
Parametry |
maxBytes |
int : maksymalny rozmiar zwróconego bufora |
offset |
int : przesunięcie pełnego bufora. |
rozpocznij
public abstract void start ()
zatrzymaj
public abstract 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,["# ILogcatReceiver\n===============\n\n\n`\npublic\n\n\ninterface\nILogcatReceiver\n`\n\n\n`\n\n\n`\n\n|---------------------------------------------|\n| com.android.tradefed.device.ILogcatReceiver |\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [LogcatReceiver](../../../../../../reference/tradefed/com/android/tradefed/device/LogcatReceiver.html) |--------------------------------------------------------------------------------------------------------|-------------------------------------------| | [LogcatReceiver](../../../../../../reference/tradefed/com/android/tradefed/device/LogcatReceiver.html) | Class that collects logcat in background. | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA class that provides the output of a device's logcat as an [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html).\n\nSummary\n-------\n\n| ### Public methods ||\n|--------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[clear](../../../../../../reference/tradefed/com/android/tradefed/device/ILogcatReceiver.html#clear())`() ` |\n| ` default `[InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | ` `[getLogcatData](../../../../../../reference/tradefed/com/android/tradefed/device/ILogcatReceiver.html#getLogcatData(int,%20int))`(int maxBytes, int offset) ` Returns the current logcat buffer given an offset. |\n| ` abstract `[InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | ` `[getLogcatData](../../../../../../reference/tradefed/com/android/tradefed/device/ILogcatReceiver.html#getLogcatData(int))`(int maxBytes) ` |\n| ` abstract `[InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | ` `[getLogcatData](../../../../../../reference/tradefed/com/android/tradefed/device/ILogcatReceiver.html#getLogcatData())`() ` |\n| ` abstract void` | ` `[start](../../../../../../reference/tradefed/com/android/tradefed/device/ILogcatReceiver.html#start())`() ` |\n| ` abstract void` | ` `[stop](../../../../../../reference/tradefed/com/android/tradefed/device/ILogcatReceiver.html#stop())`() ` |\n\nPublic methods\n--------------\n\n### clear\n\n```\npublic abstract void clear ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### getLogcatData\n\n```\npublic InputStreamSource getLogcatData (int maxBytes, \n int offset)\n```\n\nReturns the current logcat buffer given an offset.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|---------------------------------------------------|\n| `maxBytes` | `int`: The max size of the returned buffer \u003cbr /\u003e |\n| `offset` | `int`: The offset of the full buffer. \u003cbr /\u003e |\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------|\n| [InputStreamSource](../../../../../../reference/tradefed/com/android/tradefed/result/InputStreamSource.html) | The logcat buffer starting at the offset. \u003cbr /\u003e |\n\n### getLogcatData\n\n```\npublic abstract 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### getLogcatData\n\n```\npublic abstract InputStreamSource getLogcatData ()\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### start\n\n```\npublic abstract void start ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### stop\n\n```\npublic abstract void stop ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e"]]