Add default value to inline payloads

If we try to set an inline result when it has not yet been
accessed in settings, nothing is read from Settings.
Thus, include a default value for a fallback.

Manual merge for: ag/2588219/

Change-Id: I3b8eea4f82764852cea642db4455ba57f10a7d37
Fixes: 63955012
Test: robotests
This commit is contained in:
Matthew Fritze
2017-07-24 14:58:36 -07:00
parent 96a14ff07e
commit 458bb887e1
17 changed files with 87 additions and 66 deletions

View File

@@ -16,8 +16,8 @@ public class InlineListPayload extends InlinePayload {
private int mNumOptions;
public InlineListPayload(String key, @PayloadType int payloadType, Intent intent,
boolean isDeviceSupported, int numOptions) {
super(key, payloadType, intent, isDeviceSupported);
boolean isDeviceSupported, int numOptions, int defaultValue) {
super(key, payloadType, intent, isDeviceSupported, defaultValue);
mNumOptions = numOptions;
}