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.
DeviceBaselineSetter
public
abstract
class
DeviceBaselineSetter
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.suite.checker.baseline.DeviceBaselineSetter
|
Znane bezpośrednie podklasy
|
Klasa abstrakcyjna służąca do tworzenia ustawień bazowych urządzenia.
Podsumowanie
Metody publiczne |
int
|
getMinimalApiLevel()
Pobiera minimalny poziom interfejsu API obsługiwany przez metodę settera.
|
String
|
getName()
Pobiera unikalną nazwę ustawiacza.
|
boolean
|
isExperimental()
Określa, czy ustawienie wartości bazowej jest w fazie eksperymentalnej.
|
abstract
boolean
|
setBaseline(ITestDevice mDevice)
Ustawia ustawienie podstawowe dla urządzenia.
|
Konstruktory publiczne
DeviceBaselineSetter
public DeviceBaselineSetter (JSONObject object,
String name)
Parametry |
object |
JSONObject |
name |
String |
Metody publiczne
getMinimalApiLevel
public int getMinimalApiLevel ()
Pobiera minimalny poziom interfejsu API obsługiwany przez metodę settera.
getName
public String getName ()
Pobiera unikalną nazwę ustawiacza.
isExperimental
public boolean isExperimental ()
Określa, czy ustawienie wartości bazowej jest w fazie eksperymentalnej. Jest on używany do wdrażania nowych ustawień. Opcjonalnie można włączyć tylko ustawienia w ramach eksperymentu za pomocą opcji enable-experimental-device-baseline-setters. Pozostałe ustawienia nieeksperymentalne są stosowane wymuszająco, chyba że opcja enable-device-baseline-settings ma wartość false.
setBaseline
public abstract boolean setBaseline (ITestDevice mDevice)
Ustawia ustawienie podstawowe dla urządzenia.
Parametry |
mDevice |
ITestDevice |
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,["# DeviceBaselineSetter\n====================\n\n\n`\npublic\n\n\nabstract\nclass\nDeviceBaselineSetter\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.suite.checker.baseline.DeviceBaselineSetter |\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known direct subclasses [CommandBaselineSetter](../../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/baseline/CommandBaselineSetter.html), [LockSettingsBaselineSetter](../../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/baseline/LockSettingsBaselineSetter.html), [SettingsBaselineSetter](../../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/baseline/SettingsBaselineSetter.html) |------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------| | [CommandBaselineSetter](../../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/baseline/CommandBaselineSetter.html) | A common setter to handle device baseline settings via adb shell commands. | | [LockSettingsBaselineSetter](../../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/baseline/LockSettingsBaselineSetter.html) | A setter to remove screen lock settings. | | [SettingsBaselineSetter](../../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/baseline/SettingsBaselineSetter.html) | A common setter to handle device baseline settings via ITestDevice.setSetting. | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nAbstract class used to create a device baseline setting.\n\nSummary\n-------\n\n| ### Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[DeviceBaselineSetter](../../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/baseline/DeviceBaselineSetter.html#DeviceBaselineSetter(org.json.JSONObject,%20java.lang.String))`(JSONObject object, String name) ` |\n\n| ### Public methods ||\n|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` int` | ` `[getMinimalApiLevel](../../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/baseline/DeviceBaselineSetter.html#getMinimalApiLevel())`() ` Gets the minimal API level supported by the setter. |\n| ` String` | ` `[getName](../../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/baseline/DeviceBaselineSetter.html#getName())`() ` Gets the unique name of the setter. |\n| ` boolean` | ` `[isExperimental](../../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/baseline/DeviceBaselineSetter.html#isExperimental())`() ` Whether the baseline setting is under experiment stage. |\n| ` abstract boolean` | ` `[setBaseline](../../../../../../../../reference/tradefed/com/android/tradefed/suite/checker/baseline/DeviceBaselineSetter.html#setBaseline(com.android.tradefed.device.ITestDevice))`(`[ITestDevice](../../../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html)` mDevice) ` Sets the baseline setting for the device. |\n\nPublic constructors\n-------------------\n\n### DeviceBaselineSetter\n\n```\npublic DeviceBaselineSetter (JSONObject object, \n String name)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|---------------------|\n| `object` | `JSONObject` \u003cbr /\u003e |\n| `name` | `String` \u003cbr /\u003e |\n\n| Throws ||\n|-----------------|---|\n| `JSONException` | |\n\nPublic methods\n--------------\n\n### getMinimalApiLevel\n\n```\npublic int getMinimalApiLevel ()\n```\n\nGets the minimal API level supported by the setter.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|--------|\n| `int` | \u003cbr /\u003e |\n\n### getName\n\n```\npublic String getName ()\n```\n\nGets the unique name of the setter.\n\n\u003cbr /\u003e\n\n| Returns ||\n|----------|--------|\n| `String` | \u003cbr /\u003e |\n\n### isExperimental\n\n```\npublic boolean isExperimental ()\n```\n\nWhether the baseline setting is under experiment stage. It is used for the rollout of a new\nsetting. Only the settings under experiment can be optionally enabled via the option\nenable-experimental-device-baseline-setters. Other non experimental settings are force\napplied unless the option enable-device-baseline-settings is set to false.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|--------|\n| `boolean` | \u003cbr /\u003e |\n\n### setBaseline\n\n```\npublic abstract boolean setBaseline (ITestDevice mDevice)\n```\n\nSets the baseline setting for the device.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|----------------------|\n| `mDevice` | `ITestDevice` \u003cbr /\u003e |\n\n| Returns ||\n|-----------|--------|\n| `boolean` | \u003cbr /\u003e |\n\n| Throws ||\n|----------------------------------------------------------------------------------------------------------------------------------------|---|\n| [DeviceNotAvailableException](../../../../../../../../reference/tradefed/com/android/tradefed/device/DeviceNotAvailableException.html) | |"]]