Fix crash when starting daydream setting with wrong context

The context must be a UI context. This is a new requirement in P.

(Also converted the CurrentDream controller to be slice compatible)

Change-Id: I28874f296da617f4cedf6706b0663b76671f1780
Fixes: 111375261
Test: robotests
This commit is contained in:
Fan Zhang
2018-07-12 13:22:23 -07:00
parent 00d42c510d
commit 6269e50e8e
4 changed files with 26 additions and 28 deletions

View File

@@ -132,7 +132,6 @@ public class DreamSettings extends DashboardFragment {
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context) {
List<AbstractPreferenceController> controllers = new ArrayList<>();
controllers.add(new CurrentDreamPreferenceController(context));
controllers.add(new WhenToDreamPreferenceController(context));
controllers.add(new StartNowPreferenceController(context));
return controllers;