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.
NativePoc
public
abstract
class
NativePoc
extends Object
java.lang.Object
|
↳ |
com.android.sts.common.NativePoc
|
Menyiapkan dan menjalankan PoC native, yang menyatakan kondisi keluar
Ringkasan
Metode publik |
static
NativePoc.Builder
|
builder()
|
void
|
run(BaseHostJUnit4Test test)
Jalankan PoC dengan parameter dan pernyataan yang diberikan.
|
Konstanta
BUF_SIZE
static final int BUF_SIZE
Nilai Konstanta:
65536
(0x00010000)
DEFAULT_POC_TIMEOUT_SECONDS
static final long DEFAULT_POC_TIMEOUT_SECONDS
Nilai Konstanta:
60
(0x000000000000003c)
RESOURCE_ROOT
static final String RESOURCE_ROOT
Nilai Konstanta:
"/"
TMP_PATH
static final String TMP_PATH
Nilai Konstanta:
"/data/local/tmp/"
Metode publik
lari
public void run (BaseHostJUnit4Test test)
Jalankan PoC dengan parameter dan pernyataan yang diberikan.
Parameter |
test |
BaseHostJUnit4Test : instance BaseHostJUnit4Test tempat instance ini berjalan. Biasanya dipanggil dengan "this"
jika dipanggil dari pengujian STS.
|
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,["# NativePoc\n=========\n\n\n`\npublic\n\n\nabstract\nclass\nNativePoc\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|----------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.sts.common.NativePoc |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nSetup and run a native PoC, asserting exit conditions\n\nSummary\n-------\n\n| ### Nested classes ||\n|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` interface` | [NativePoc.AfterFunction](../../../../../../reference/sts/com/android/sts/common/NativePoc.AfterFunction.html) Lambda construct to run after PoC finished executing but before assertion and cleanup. |\n| ` class` | [NativePoc.Builder](../../../../../../reference/sts/com/android/sts/common/NativePoc.Builder.html) |\n\n| ### Constants ||\n|----------|----------------------------------------------------------------------------------------------------------------------------------|\n| `int` | [BUF_SIZE](../../../../../../reference/sts/com/android/sts/common/NativePoc.html#BUF_SIZE) |\n| `long` | [DEFAULT_POC_TIMEOUT_SECONDS](../../../../../../reference/sts/com/android/sts/common/NativePoc.html#DEFAULT_POC_TIMEOUT_SECONDS) |\n| `String` | [RESOURCE_ROOT](../../../../../../reference/sts/com/android/sts/common/NativePoc.html#RESOURCE_ROOT) |\n| `String` | [TMP_PATH](../../../../../../reference/sts/com/android/sts/common/NativePoc.html#TMP_PATH) |\n\n| ### Public methods ||\n|--------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static `[NativePoc.Builder](../../../../../../reference/sts/com/android/sts/common/NativePoc.Builder.html) | ` `[builder](../../../../../../reference/sts/com/android/sts/common/NativePoc.html#builder())`() ` |\n| ` void` | ` `[run](../../../../../../reference/sts/com/android/sts/common/NativePoc.html#run(com.android.tradefed.testtype.junit4.BaseHostJUnit4Test))`(BaseHostJUnit4Test test) ` Execute the PoC with the given parameters and assertions. |\n\nConstants\n---------\n\n### BUF_SIZE\n\n```\nstatic final int BUF_SIZE\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nConstant Value:\n\n65536\n(0x00010000)\n\n\n### DEFAULT_POC_TIMEOUT_SECONDS\n\n```\nstatic final long DEFAULT_POC_TIMEOUT_SECONDS\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nConstant Value:\n\n60\n(0x000000000000003c)\n\n\n### RESOURCE_ROOT\n\n```\nstatic final String RESOURCE_ROOT\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nConstant Value:\n\n\"/\"\n\n\n### TMP_PATH\n\n```\nstatic final String TMP_PATH\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nConstant Value:\n\n\"/data/local/tmp/\"\n\n\nPublic methods\n--------------\n\n### builder\n\n```\npublic static NativePoc.Builder builder ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|----------------------------------------------------------------------------------------------------|--------|\n| [NativePoc.Builder](../../../../../../reference/sts/com/android/sts/common/NativePoc.Builder.html) | \u003cbr /\u003e |\n\n### run\n\n```\npublic void run (BaseHostJUnit4Test test)\n```\n\nExecute the PoC with the given parameters and assertions.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| `test` | `BaseHostJUnit4Test`: the instance of BaseHostJUnit4Test this is running in. Usually called with \"this\" if called from an STS test. \u003cbr /\u003e |\n\n| Throws ||\n|-------------|---|\n| `Exception` | |"]]