Merge "Use CDS display white balance getter and setter" into qt-dev

am: 65b535f44a

Change-Id: I53943d5c4cd38964aa30254754327c8c474e39cd
This commit is contained in:
Christine Franks
2019-04-05 20:43:37 -07:00
committed by android-build-merger
2 changed files with 11 additions and 23 deletions

View File

@@ -41,15 +41,12 @@ public class DisplayWhiteBalancePreferenceController extends TogglePreferenceCon
@Override
public boolean isChecked() {
return Secure.getIntForUser(mContext.getContentResolver(),
Secure.DISPLAY_WHITE_BALANCE_ENABLED, 0, UserHandle.USER_CURRENT) == 1;
return getColorDisplayManager().isDisplayWhiteBalanceEnabled();
}
@Override
public boolean setChecked(boolean isChecked) {
Secure.putIntForUser(mContext.getContentResolver(), Secure.DISPLAY_WHITE_BALANCE_ENABLED,
isChecked ? 1 : 0, UserHandle.USER_CURRENT);
return true;
return getColorDisplayManager().setDisplayWhiteBalanceEnabled(isChecked);
}
@VisibleForTesting