Quick fix for FAB fade setting summary
Fixes the fade setting to properly set its summary when not disabled.
Flag: EXEMPT internal change
Bug: 349178637
Test: Check the settings page with navigation button mode and FAB button mode. Verify the summary of the fade setting is correct in both cases.
Change-Id: Ia87a634fd69e6098f1a0a658f788e69d10f2dbec
diff --git a/src/com/android/settings/accessibility/FloatingMenuFadePreferenceController.java b/src/com/android/settings/accessibility/FloatingMenuFadePreferenceController.java
index 70882a4..2ef0858 100644
--- a/src/com/android/settings/accessibility/FloatingMenuFadePreferenceController.java
+++ b/src/com/android/settings/accessibility/FloatingMenuFadePreferenceController.java
@@ -67,14 +67,11 @@
@Override
public CharSequence getSummary() {
- if (mPreference != null) {
- return mPreference.isEnabled()
- ? "%s"
- : mContext.getString(
- R.string.accessibility_button_disabled_button_mode_summary);
- } else {
- return "%s";
+ int rId = R.string.accessibility_button_fade_summary;
+ if (mPreference != null && !mPreference.isEnabled()) {
+ rId = R.string.accessibility_button_disabled_button_mode_summary;
}
+ return mContext.getString(rId);
}
@Override