use of android.hardware.display.ColorDisplayManager in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class NightDisplayPreferenceController method isSuggestionComplete.
public static boolean isSuggestionComplete(Context context) {
final boolean isEnabled = context.getResources().getBoolean(R.bool.config_night_light_suggestion_enabled);
// The suggestion is always complete if not enabled.
if (!isEnabled) {
return true;
}
final ColorDisplayManager manager = context.getSystemService(ColorDisplayManager.class);
return manager.getNightDisplayAutoMode() != ColorDisplayManager.AUTO_MODE_DISABLED;
}
use of android.hardware.display.ColorDisplayManager in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class DisplayWhiteBalancePreferenceController method updateVisibility.
@VisibleForTesting
void updateVisibility() {
if (mPreference != null) {
ColorDisplayManager cdm = getColorDisplayManager();
// Display white balance is only valid in linear light space. COLOR_MODE_SATURATED
// implies unmanaged color mode, and hence unknown color processing conditions.
// We also disallow display white balance when color accessibility features are enabled.
mPreference.setVisible(cdm.getColorMode() != ColorDisplayManager.COLOR_MODE_SATURATED && !cdm.areAccessibilityTransformsEnabled(mContext));
}
}
use of android.hardware.display.ColorDisplayManager in project android_packages_apps_Settings by omnirom.
the class DisplayWhiteBalancePreferenceController method updateVisibility.
@VisibleForTesting
void updateVisibility() {
if (mPreference != null) {
ColorDisplayManager cdm = getColorDisplayManager();
// Display white balance is only valid in linear light space. COLOR_MODE_SATURATED
// implies unmanaged color mode, and hence unknown color processing conditions.
// We also disallow display white balance when color accessibility features are enabled.
mPreference.setVisible(cdm.getColorMode() != ColorDisplayManager.COLOR_MODE_SATURATED && !cdm.areAccessibilityTransformsEnabled(mContext));
}
}
use of android.hardware.display.ColorDisplayManager in project android_packages_apps_Settings by omnirom.
the class NightDisplayPreferenceController method isSuggestionComplete.
public static boolean isSuggestionComplete(Context context) {
final boolean isEnabled = context.getResources().getBoolean(R.bool.config_night_light_suggestion_enabled);
// The suggestion is always complete if not enabled.
if (!isEnabled) {
return true;
}
final ColorDisplayManager manager = context.getSystemService(ColorDisplayManager.class);
return manager.getNightDisplayAutoMode() != ColorDisplayManager.AUTO_MODE_DISABLED;
}
Aggregations