Remove mentions of "gesture" on the Accessibility Button settings page
Configures page to hide/replace elements that would mention gesture. Also, provides context when necessary if a setting is disabled by the current button mode. Demonstration video: https://x20web.corp.google.com/users/jo/jonesriley/splitShortcut/a11yShortcutSettingsCleanup.mp4 Test: manual, navigate to the Accessibility Button "more options" page in gesture navigation mode. Verify there are no references to gesture. Bug: 349178639 Flag: android.provider.a11y_standalone_gesture_enabled Change-Id: I067738d23e74c00bab4010d187820d09013809ad
This commit is contained in:
@@ -28,6 +28,7 @@ import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.preference.TwoStatePreference;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
import com.android.settingslib.core.lifecycle.LifecycleObserver;
|
||||
import com.android.settingslib.core.lifecycle.events.OnPause;
|
||||
@@ -64,6 +65,18 @@ public class FloatingMenuFadePreferenceController extends BasePreferenceControll
|
||||
? AVAILABLE : DISABLED_DEPENDENT_SETTING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getSummary() {
|
||||
if (mPreference != null) {
|
||||
return mPreference.isEnabled()
|
||||
? "%s"
|
||||
: mContext.getString(
|
||||
R.string.accessibility_button_disabled_button_mode_summary);
|
||||
} else {
|
||||
return "%s";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayPreference(PreferenceScreen screen) {
|
||||
super.displayPreference(screen);
|
||||
@@ -101,6 +114,7 @@ public class FloatingMenuFadePreferenceController extends BasePreferenceControll
|
||||
|
||||
private void updateAvailabilityStatus() {
|
||||
mPreference.setEnabled(AccessibilityUtil.isFloatingMenuEnabled(mContext));
|
||||
refreshSummary(mPreference);
|
||||
}
|
||||
|
||||
private int getFloatingMenuFadeValue() {
|
||||
|
Reference in New Issue
Block a user