Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
DeviceBaselineSetter
public
abstract
class
DeviceBaselineSetter
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.suite.checker.baseline.DeviceBaselineSetter
|
Abstract class used to create a device baseline setting.
Summary
Public methods |
int
|
getMinimalApiLevel()
Gets the minimal API level supported by the setter.
|
String
|
getName()
Gets the unique name of the setter.
|
boolean
|
isExperimental()
Whether the baseline setting is under experiment stage.
|
abstract
boolean
|
setBaseline(ITestDevice mDevice)
Sets the baseline setting for the device.
|
Public constructors
DeviceBaselineSetter
public DeviceBaselineSetter (JSONObject object,
String name)
Parameters |
object |
JSONObject |
name |
String |
Public methods
getMinimalApiLevel
public int getMinimalApiLevel ()
Gets the minimal API level supported by the setter.
getName
public String getName ()
Gets the unique name of the setter.
isExperimental
public boolean isExperimental ()
Whether the baseline setting is under experiment stage. It is used for the rollout of a new
setting. Only the settings under experiment can be optionally enabled via the option
enable-experimental-device-baseline-setters. Other non experimental settings are force
applied unless the option enable-device-baseline-settings is set to false.
setBaseline
public abstract boolean setBaseline (ITestDevice mDevice)
Sets the baseline setting for the device.
Parameters |
mDevice |
ITestDevice |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-07-02 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-02 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) | |"]]