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.
ITokenProvider
public
interface
ITokenProvider
com.android.tradefed.invoker.shard.token.ITokenProvider
|
Known indirect subclasses
|
Interface describing an object that can provide the tokens of a particular device. Each
implementation can check one or several tokens.
A token is a special property present on the particular device.
Tokens are used during sharding to ensure tests requesting a particular tokens are run against
the device providing the token.
Summary
Public methods
hasToken
public abstract boolean hasToken (ITestDevice device,
TokenProperty token)
Query and return whether or not the device has a particular token.
Parameters |
device |
ITestDevice : Device queried for its tokens. |
token |
TokenProperty : The token to check |
Returns |
boolean |
True if the device has the token, false otherwise. |
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 2023-03-08 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 2023-03-08 UTC."],[],[],null,["# ITokenProvider\n==============\n\n\n`\npublic\n\n\ninterface\nITokenProvider\n`\n\n\n`\n\n\n`\n\n|---------------------------------------------------------|\n| com.android.tradefed.invoker.shard.token.ITokenProvider |\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [CecControllerTokenProvider](../../../../../../../../reference/tradefed/com/android/tradefed/invoker/shard/token/CecControllerTokenProvider.html), [TelephonyTokenProvider](../../../../../../../../reference/tradefed/com/android/tradefed/invoker/shard/token/TelephonyTokenProvider.html) |---------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------| | [CecControllerTokenProvider](../../../../../../../../reference/tradefed/com/android/tradefed/invoker/shard/token/CecControllerTokenProvider.html) | Token provider for Consumer Electronics Control (CEC) related tokens. | | [TelephonyTokenProvider](../../../../../../../../reference/tradefed/com/android/tradefed/invoker/shard/token/TelephonyTokenProvider.html) | Token provider for telephony related tokens. | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface describing an object that can provide the tokens of a particular device. Each\nimplementation can check one or several tokens.\n\nA token is a special property present on the particular device.\n\nTokens are used during sharding to ensure tests requesting a particular tokens are run against\nthe device providing the token.\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract boolean` | ` `[hasToken](../../../../../../../../reference/tradefed/com/android/tradefed/invoker/shard/token/ITokenProvider.html#hasToken(com.android.tradefed.device.ITestDevice,%20com.android.tradefed.invoker.shard.token.TokenProperty))`(`[ITestDevice](../../../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html)` device, `[TokenProperty](../../../../../../../../reference/tradefed/com/android/tradefed/invoker/shard/token/TokenProperty.html)` token) ` Query and return whether or not the device has a particular token. |\n\nPublic methods\n--------------\n\n### hasToken\n\n```\npublic abstract boolean hasToken (ITestDevice device, \n TokenProperty token)\n```\n\nQuery and return whether or not the device has a particular token.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|------------------------------------------------------|\n| `device` | `ITestDevice`: Device queried for its tokens. \u003cbr /\u003e |\n| `token` | `TokenProperty`: The token to check \u003cbr /\u003e |\n\n| Returns ||\n|-----------|-----------------------------------------------------------|\n| `boolean` | True if the device has the token, false otherwise. \u003cbr /\u003e |"]]