Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76129cbe authored by Shaowei Shen's avatar Shaowei Shen Committed by Android (Google) Code Review
Browse files

Merge "[Touchpad Setting] Hide Touchpad page when there's no connected one" into main

parents 606f9b17 60eae5e0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -56,7 +56,8 @@ public class TrackpadSettings extends DashboardFragment {
                @Override
                protected boolean isPageSearchEnabled(Context context) {
                    return FeatureFlagUtils
                            .isEnabled(context, FeatureFlagUtils.SETTINGS_NEW_KEYBOARD_TRACKPAD);
                            .isEnabled(context, FeatureFlagUtils.SETTINGS_NEW_KEYBOARD_TRACKPAD)
                            && NewKeyboardSettingsUtils.isTouchpad();
                }
            };
}
+2 −1
Original line number Diff line number Diff line
@@ -58,7 +58,8 @@ public class TrackpadTouchGestureSettings extends DashboardFragment {
                    return FeatureFlagUtils
                            .isEnabled(
                                    context,
                                    FeatureFlagUtils.SETTINGS_NEW_KEYBOARD_TRACKPAD_GESTURE);
                                    FeatureFlagUtils.SETTINGS_NEW_KEYBOARD_TRACKPAD_GESTURE)
                            && NewKeyboardSettingsUtils.isTouchpad();
                }
            };
}
+2 −1
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ public class TrackpadTouchGestureSettingsController extends BasePreferenceContro
    public int getAvailabilityStatus() {
        boolean isFeatureOn = FeatureFlagUtils
                .isEnabled(mContext, FeatureFlagUtils.SETTINGS_NEW_KEYBOARD_TRACKPAD_GESTURE);
        return isFeatureOn ? AVAILABLE : CONDITIONALLY_UNAVAILABLE;
        boolean isTouchpad = NewKeyboardSettingsUtils.isTouchpad();
        return (isFeatureOn && isTouchpad) ? AVAILABLE : CONDITIONALLY_UNAVAILABLE;
    }
}