Merge "Make sure we don't accidentally allow the night mode tile" into nyc-dev

This commit is contained in:
TreeHugger Robot
2016-06-13 21:13:35 +00:00
committed by Android (Google) Code Review

View File

@@ -80,6 +80,7 @@ public class AutoTileManager {
new NightModeController.Listener() { new NightModeController.Listener() {
@Override @Override
public void onNightModeChanged() { public void onNightModeChanged() {
if (mHost.getNightModeController().isEnabled()) {
mHost.addTile("night"); mHost.addTile("night");
Prefs.putBoolean(mContext, Key.QS_NIGHT_ADDED, true); Prefs.putBoolean(mContext, Key.QS_NIGHT_ADDED, true);
mHandler.post(new Runnable() { mHandler.post(new Runnable() {
@@ -89,6 +90,7 @@ public class AutoTileManager {
} }
}); });
} }
}
@Override @Override
public void onTwilightAutoChanged() { } public void onTwilightAutoChanged() { }