Update Touchpad settings page to include mouse.

Make each setting conditionally available based on touchpad or mouse
connected to device.

Bug: 269100659
Test: TrackpadBottomPreferenceControllerTest
Test: TrackpadReverseScrollingPreferenceControllerTest
Test: TrackpadTapToClickPreferenceControllerTest
Test: TrackpadSettingsControllerTest
Flag: android.view.flags.enable_vector_cursor_a11y_settings
Change-Id: I601c29e20d69227779481c0a491256e36cfd268f
This commit is contained in:
Pat Manning
2024-04-18 11:14:59 +00:00
parent 9ff81e6b3a
commit 1257610b0e
15 changed files with 180 additions and 9 deletions

View File

@@ -84,6 +84,10 @@ public class TrackpadSettingsController extends BasePreferenceController
boolean isFeatureOn = FeatureFlagUtils
.isEnabled(mContext, FeatureFlagUtils.SETTINGS_NEW_KEYBOARD_TRACKPAD);
boolean isTouchpad = NewKeyboardSettingsUtils.isTouchpad();
return (isFeatureOn && isTouchpad) ? AVAILABLE : CONDITIONALLY_UNAVAILABLE;
boolean isPointerCustomizationEnabled =
android.view.flags.Flags.enableVectorCursorA11ySettings();
boolean isMouse = NewKeyboardSettingsUtils.isMouse();
return (isFeatureOn && isTouchpad) || (isPointerCustomizationEnabled && isMouse) ? AVAILABLE
: CONDITIONALLY_UNAVAILABLE;
}
}