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. Change-Id: I8a593d9ff3308b2d0cd5bc65658d160abf55b07e Fixes: 63955012 Test: robotests
This commit is contained in:
@@ -85,6 +85,7 @@ public class AmbientDisplayAlwaysOnPreferenceController extends PreferenceContro
|
||||
mContext.getString(R.string.ambient_display_screen_title));
|
||||
|
||||
return new InlineSwitchPayload(Settings.Secure.DOZE_ALWAYS_ON,
|
||||
ResultPayload.SettingsSource.SECURE, ON, intent, isAvailable());
|
||||
ResultPayload.SettingsSource.SECURE, ON /* onValue */, intent, isAvailable(),
|
||||
ON /* defaultValue */);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user