Update Reduce Bright Colors preference string

Test: manual, atest ReduceBrightColorsPreferenceControllerTest
Bug: 182116724
Change-Id: Ifde343aad7c6931efd083a1c728a2504b74f089f
This commit is contained in:
sallyyuen
2021-03-22 19:52:38 -07:00
parent 88cd3dae5f
commit cd09b3a571
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