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.
NullDevice
public
class
NullDevice
extends StubDevice
Obiekt zastępczy IDevice
używany przez funkcję DeviceManager
do przydzielenia wartości, gdy IDeviceSelection.nullDeviceRequested()
ma wartość true
Podsumowanie
Metody publiczne |
final
boolean
|
isTemporary()
Zwraca wartość Prawda, jeśli urządzenie zostało utworzone tymczasowo na potrzeby wywołania i powinno zostać później usunięte.
|
Fieldsem
TEMP_NULL_DEVICE_PREFIX
public static final String TEMP_NULL_DEVICE_PREFIX
Wzór nazwy automatycznie utworzonych pustych urządzeń
Konstruktory publiczne
NullDevice
public NullDevice (String serial)
NullDevice
public NullDevice (String serial,
boolean isTemporary)
Parametry |
serial |
String |
isTemporary |
boolean |
Metody publiczne
isTemporary
public final boolean isTemporary ()
Zwraca wartość Prawda, jeśli urządzenie zostało utworzone tymczasowo na potrzeby wywołania i powinno zostać później usunięte.
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,["# NullDevice\n==========\n\n\n`\npublic\n\n\nclass\nNullDevice\n`\n\n\n`\n\n\n`\n\n`\n\nextends `[StubDevice](../../../../../../reference/tradefed/com/android/tradefed/device/StubDevice.html)`\n\n\n`\n\n`\n\n\n`\n\n|---|---|----------------------------------------|\n| java.lang.Object |||\n| ↳ | [com.android.tradefed.device.StubDevice](../../../../../../reference/tradefed/com/android/tradefed/device/StubDevice.html) ||\n| | ↳ | com.android.tradefed.device.NullDevice |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA placeholder [IDevice](../../../../../../reference/tradefed/com/android/ddmlib/IDevice.html) used by [DeviceManager](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceManager.html) to allocate when\n[IDeviceSelection.nullDeviceRequested()](../../../../../../reference/tradefed/com/android/tradefed/device/IDeviceSelection.html#nullDeviceRequested()) is `true`\n\nSummary\n-------\n\n| ### Fields ||\n|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` public static final String` | [TEMP_NULL_DEVICE_PREFIX](../../../../../../reference/tradefed/com/android/tradefed/device/NullDevice.html#TEMP_NULL_DEVICE_PREFIX) Naming pattern for auto-created null devices |\n\n| ### Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[NullDevice](../../../../../../reference/tradefed/com/android/tradefed/device/NullDevice.html#NullDevice(java.lang.String))`(String serial) ` |\n| ` `[NullDevice](../../../../../../reference/tradefed/com/android/tradefed/device/NullDevice.html#NullDevice(java.lang.String,%20boolean))`(String serial, boolean isTemporary) ` |\n\n| ### Public methods ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` final boolean` | ` `[isTemporary](../../../../../../reference/tradefed/com/android/tradefed/device/NullDevice.html#isTemporary())`() ` Returns true if the device was created temporarily for the invocation and should be deleted afterward. |\n\nFields\n------\n\n### TEMP_NULL_DEVICE_PREFIX\n\n```\npublic static final String TEMP_NULL_DEVICE_PREFIX\n```\n\nNaming pattern for auto-created null devices\n\n\u003cbr /\u003e\n\nPublic constructors\n-------------------\n\n### NullDevice\n\n```\npublic NullDevice (String serial)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|-----------------|\n| `serial` | `String` \u003cbr /\u003e |\n\n### NullDevice\n\n```\npublic NullDevice (String serial, \n boolean isTemporary)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------|------------------|\n| `serial` | `String` \u003cbr /\u003e |\n| `isTemporary` | `boolean` \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### isTemporary\n\n```\npublic final boolean isTemporary ()\n```\n\nReturns true if the device was created temporarily for the invocation and should be deleted\nafterward.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|--------|\n| `boolean` | \u003cbr /\u003e |"]]