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

am: 126366dde5

Change-Id: Iba8b3696738f9fc0260311d49d6e98dfcedbc118
This commit is contained in:
Jason Monk
2016-06-13 22:17:07 +00:00
committed by android-build-merger

View File

@@ -80,14 +80,16 @@ public class AutoTileManager {
new NightModeController.Listener() {
@Override
public void onNightModeChanged() {
mHost.addTile("night");
Prefs.putBoolean(mContext, Key.QS_NIGHT_ADDED, true);
mHandler.post(new Runnable() {
@Override
public void run() {
mHost.getNightModeController().removeListener(mNightModeListener);
}
});
if (mHost.getNightModeController().isEnabled()) {
mHost.addTile("night");
Prefs.putBoolean(mContext, Key.QS_NIGHT_ADDED, true);
mHandler.post(new Runnable() {
@Override
public void run() {
mHost.getNightModeController().removeListener(mNightModeListener);
}
});
}
}
@Override