Update auto brightness pref summary to show on/off
Change-Id: I7914957cc9dbffcc12e34fc714bb9c37783a4f33 Fixes: 109885418 Test: robotests
This commit is contained in:
@@ -21,6 +21,7 @@ import android.content.Context;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
|
||||
|
||||
@@ -59,4 +60,11 @@ public class AutoBrightnessPreferenceController extends TogglePreferenceControll
|
||||
public boolean isSliceable() {
|
||||
return TextUtils.equals(getPreferenceKey(), "auto_brightness");
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getSummary() {
|
||||
return mContext.getText(isChecked()
|
||||
? R.string.auto_brightness_summary_on
|
||||
: R.string.auto_brightness_summary_off);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user