Implement dream complication settings.

This component allows the user to select dream complications to
enable/disable.

Bug: 215703483
Test: locally on device
Change-Id: I03dd9d67b4aeb3f41885b42391d97c18bd7465f6
This commit is contained in:
Lucas Silva
2022-01-27 15:38:50 +00:00
parent 5a7fc5d613
commit f0f7adc612
8 changed files with 178 additions and 21 deletions

View File

@@ -40,7 +40,7 @@ import java.util.stream.Collectors;
* Controller for the dream picker where the user can select a screensaver.
*/
public class DreamPickerController extends BasePreferenceController {
public static final String KEY = "dream_picker";
private static final String KEY = "dream_picker";
private final DreamBackend mBackend;
private final MetricsFeatureProvider mMetricsFeatureProvider;
@@ -51,12 +51,12 @@ public class DreamPickerController extends BasePreferenceController {
private DreamBackend.DreamInfo mActiveDream;
private DreamAdapter mAdapter;
public DreamPickerController(Context context, String preferenceKey) {
this(context, preferenceKey, DreamBackend.getInstance(context));
public DreamPickerController(Context context) {
this(context, DreamBackend.getInstance(context));
}
public DreamPickerController(Context context, String preferenceKey, DreamBackend backend) {
super(context, preferenceKey);
public DreamPickerController(Context context, DreamBackend backend) {
super(context, KEY);
mBackend = backend;
mDreamInfos = mBackend.getDreamInfos();
mActiveDrawable = context.getDrawable(R.drawable.ic_dream_check_circle);