[Touchpad Setting] Hide Touchpad page when there's no connected one
The option for entering page already has complete check condition. Update the same check logic to isSeachable in setting page to hide page when there's no touchpad connected. Also apply check on trackpadTouchGesture. Test: verify on device Bug: 346497646 Flag: EXEMPT bugfix Change-Id: I1730c7bd1fd2615dc1725ec0cc32293254e5b54a
This commit is contained in:
committed by
Shaowei Shen
parent
8d5d69d62f
commit
60eae5e01c
@@ -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();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user