Merge "Update Reduce Bright Colors preference string" into sc-dev

This commit is contained in:
Sally Yuen
2021-03-24 19:11:31 +00:00
committed by Android (Google) Code Review
3 changed files with 5 additions and 23 deletions

View File

@@ -18,8 +18,8 @@ package com.android.settings.accessibility;
import android.content.Context;
import android.hardware.display.ColorDisplayManager;
import android.provider.Settings;
import com.android.settings.R;
import com.android.settings.core.BasePreferenceController;
/** PreferenceController that shows the Reduce Bright Colors summary */
@@ -32,8 +32,8 @@ public class ReduceBrightColorsPreferenceController extends BasePreferenceContro
@Override
public CharSequence getSummary() {
return AccessibilityUtil.getSummary(mContext,
Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED);
return mContext.getText(
R.string.reduce_bright_colors_preference_summary);
}
@Override

View File

@@ -94,8 +94,6 @@ public class TurnScreenDarkerFragment extends DashboardFragment {
if (ColorDisplayManager.isColorTransformAccelerated(getContext())) {
mToggleInversionPreference.setSummary(AccessibilityUtil.getSummary(
getContext(), Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED));
mReduceBrightColorsPreference.setSummary(AccessibilityUtil.getSummary(
getContext(), Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED));
getPreferenceScreen().removePreference(experimentalCategory);
} else {
// Move following preferences to experimental category if device don't supports HWC