Merge "Reset last activated time after auto mode changed" into oc-dr1-dev

am: 13cfb46e41

Change-Id: Ic54dae12f687caf5288ccbf3cd3c842ce4742721
This commit is contained in:
Justin Klaassen
2017-06-20 23:56:13 +00:00
committed by android-build-merger

View File

@@ -182,6 +182,10 @@ public final class NightDisplayController {
throw new IllegalArgumentException("Invalid autoMode: " + autoMode);
}
if (getAutoMode() != autoMode) {
Secure.putLongForUser(mContext.getContentResolver(),
Secure.NIGHT_DISPLAY_LAST_ACTIVATED_TIME, -1L, mUserId);
}
return Secure.putIntForUser(mContext.getContentResolver(),
Secure.NIGHT_DISPLAY_AUTO_MODE, autoMode, mUserId);
}