diff options
| author | Felipe Leme <felipeal@google.com> | 2017-02-22 15:02:03 -0800 |
|---|---|---|
| committer | Felipe Leme <felipeal@google.com> | 2017-02-22 16:09:50 -0800 |
| commit | d09ccb8db6c541f2d349b923bf9b38f1081aaa8d (patch) | |
| tree | 6456904cca450a62462394f6a527c13331d1b699 /core/java/android/view/ViewStructure.java | |
| parent | fc5cbc90cf9708fd7ab7a34e8c2925db2028854e (diff) | |
Added auto-fill support for Spinner.
Spinner is a special kind of list-value field because its auto-fillable
values are not currently present in the assist structure: this change
adds a getAutoFillOptions() to fill that void, and implements the
auto-fill APIs on Spinner.
It also fixes RadioGroup.getAutoFillValue() - it should return the index
of the child, not its resource id.
Bug: 33550221
Test: CtsAutoFillServiceTestCases (with new tests) pass
Change-Id: I625e7dd705fade56fda490fcd3c4446c0c245ee1
Diffstat (limited to 'core/java/android/view/ViewStructure.java')
| -rw-r--r-- | core/java/android/view/ViewStructure.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/view/ViewStructure.java b/core/java/android/view/ViewStructure.java index bc2725f56bf6..84c2c8452e98 100644 --- a/core/java/android/view/ViewStructure.java +++ b/core/java/android/view/ViewStructure.java @@ -307,6 +307,15 @@ public abstract class ViewStructure { public abstract void setAutoFillValue(AutoFillValue value); /** + * Sets the options that can be used to auto-fill this node. + * + * <p>Typically used by nodes whose {@link AutoFillType} is a list to indicate the meaning of + * each possible value in the list. + */ + // TODO(b/33197203, b/33802548): add CTS/unit test + public abstract void setAutoFillOptions(String[] options); + + /** * Marks this node as sanitized so its content are sent on {@link * android.service.autofill.AutoFillService#onFillRequest(android.app.assist.AssistStructure, * Bundle, android.os.CancellationSignal, android.service.autofill.FillCallback)}. |
