Mulai 27 Maret 2025, sebaiknya gunakan android-latest-release
, bukan aosp-main
, untuk mem-build dan berkontribusi pada AOSP. Untuk mengetahui informasi selengkapnya, lihat Perubahan pada AOSP.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
DeviceSettingChecker
public
class
DeviceSettingChecker
extends Object
implements
ISystemStatusChecker
java.lang.Object
|
↳ |
com.android.tradefed.suite.checker.DeviceSettingChecker
|
Periksa apakah setelan perangkat telah berubah selama modul berjalan.
Ringkasan
Konstruktor publik
DeviceSettingChecker
public DeviceSettingChecker ()
Metode publik
postExecutionCheck
public StatusCheckerResult postExecutionCheck (ITestDevice device)
Periksa kondisi sistem setelah eksekusi modul pengujian. Subclass harus mengganti metode ini jika
pemeriksaan diinginkan di sini. Implementasi harus menampilkan nilai boolean
untuk menunjukkan
apakah pemeriksaan status telah lulus atau gagal.
Parameter |
device |
ITestDevice : ITestDevice tempat pemeriksaan akan dijalankan. |
preExecutionCheck
public StatusCheckerResult preExecutionCheck (ITestDevice device)
Periksa kondisi sistem sebelum menjalankan modul pengujian. Subclass harus mengganti metode ini jika
pemeriksaan diinginkan di sini. Implementasi harus menampilkan nilai boolean
untuk
menunjukkan apakah pemeriksaan status telah lulus atau gagal.
Sebaiknya status sistem diperiksa setelah eksekusi
modul, dan metode ini dapat digunakan untuk tujuan menyimpan status sistem tertentu dalam cache sebelum
eksekusi modul.
Parameter |
device |
ITestDevice : ITestDevice tempat pemeriksaan akan dijalankan. |
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# DeviceSettingChecker\n====================\n\n\n`\npublic\n\n\nclass\nDeviceSettingChecker\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\nimplements\n\n`[ISystemStatusChecker](../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/ISystemStatusChecker.html)`\n\n\n`\n\n|---|---------------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.suite.checker.DeviceSettingChecker |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nCheck if device settings have changed during a module run.\n\nSummary\n-------\n\n| ### Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[DeviceSettingChecker](../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/DeviceSettingChecker.html#DeviceSettingChecker())`() ` |\n\n| ### Public methods ||\n|-------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` `[StatusCheckerResult](../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/StatusCheckerResult.html) | ` `[postExecutionCheck](../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/DeviceSettingChecker.html#postExecutionCheck(com.android.tradefed.device.ITestDevice))`(`[ITestDevice](../../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html)` device) ` Check system condition after test module execution. |\n| ` `[StatusCheckerResult](../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/StatusCheckerResult.html) | ` `[preExecutionCheck](../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/DeviceSettingChecker.html#preExecutionCheck(com.android.tradefed.device.ITestDevice))`(`[ITestDevice](../../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html)` device) ` Check system condition before test module execution. |\n\nPublic constructors\n-------------------\n\n### DeviceSettingChecker\n\n```\npublic DeviceSettingChecker ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### postExecutionCheck\n\n```\npublic StatusCheckerResult postExecutionCheck (ITestDevice device)\n```\n\nCheck system condition after test module execution. Subclass should override this method if a\ncheck is desirable here. Implementation must return a `boolean` value to indicate\nif the status check has passed or failed.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `device` | `ITestDevice`: The [ITestDevice](../../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html) on which to run the checks. \u003cbr /\u003e |\n\n| Returns ||\n|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------|\n| [StatusCheckerResult](../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/StatusCheckerResult.html) | result of system status check \u003cbr /\u003e |\n\n| Throws ||\n|-------------------------------------------------------------------------------------------------------------------------------------|---|\n| [DeviceNotAvailableException](../../../../../../../reference/tradefed/com/android/tradefed/device/DeviceNotAvailableException.html) | |\n\n### preExecutionCheck\n\n```\npublic StatusCheckerResult preExecutionCheck (ITestDevice device)\n```\n\nCheck system condition before test module execution. Subclass should override this method if\na check is desirable here. Implementation must return a `boolean` value to\nindicate if the status check has passed or failed.\n\nIt's strongly recommended that system status be checked **after** module\nexecution, and this method may be used for the purpose of caching certain system state prior\nto module execution.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `device` | `ITestDevice`: The [ITestDevice](../../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html) on which to run the checks. \u003cbr /\u003e |\n\n| Returns ||\n|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------|\n| [StatusCheckerResult](../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/StatusCheckerResult.html) | result of system status check \u003cbr /\u003e |\n\n| Throws ||\n|-------------------------------------------------------------------------------------------------------------------------------------|---|\n| [DeviceNotAvailableException](../../../../../../../reference/tradefed/com/android/tradefed/device/DeviceNotAvailableException.html) | |"]]