Builder
class Builder
| kotlin.Any | |
| ↳ | android.hardware.input.AppCustomizationAction.Builder |
Builder for AppCustomizationAction.
Summary
| Public constructors | |
|---|---|
Builder(component: ComponentName, action: String)Creates a new Builder for an |
|
| Public methods | |
|---|---|
| AppCustomizationAction |
build()Builds the |
| AppCustomizationAction.Builder |
Sets the intent data URI. |
Public constructors
Builder
Builder(
component: ComponentName,
action: String)
Creates a new Builder for an AppCustomizationAction targeting the specified component and action.
| Parameters | |
|---|---|
component |
ComponentName: The target ComponentName to be launched. Must not be null. |
action |
String: The intent action to set. Only ACTION_MAIN and ACTION_VIEW are supported. Must not be null. |
| Exceptions | |
|---|---|
java.lang.IllegalArgumentException |
if action is not ACTION_MAIN or ACTION_VIEW. |
java.lang.NullPointerException |
if component or action is null. |
Public methods
build
fun build(): AppCustomizationAction
Builds the AppCustomizationAction.
| Return | |
|---|---|
AppCustomizationAction |
The built AppCustomizationAction. This value cannot be null. |
setData
fun setData(data: Uri?): AppCustomizationAction.Builder
Sets the intent data URI. This field is optional.
| Parameters | |
|---|---|
data |
Uri?: The data URI to set. This value may be null. |
| Return | |
|---|---|
AppCustomizationAction.Builder |
This builder. This value cannot be null. |