Settings: Do not hide navigation modes

* We have customization for 3 buttons included here.
* Instead hide "Gesture Navigation" if config_swipe_up_gesture_setting_available is disabled.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
Pranav Vashi
2025-03-26 21:53:46 +05:30
committed by Joey
parent d4e7b3a39c
commit 7506ee034f
2 changed files with 6 additions and 4 deletions

View File

@@ -201,7 +201,8 @@ public class SystemNavigationGestureSettings extends RadioButtonPickerFragment i
List<CandidateInfoExtra> candidates = new ArrayList<>();
if (SystemNavigationPreferenceController.isOverlayPackageAvailable(c,
NAV_BAR_MODE_GESTURAL_OVERLAY)) {
NAV_BAR_MODE_GESTURAL_OVERLAY)
&& SystemNavigationPreferenceController.isGestureAvailable(c)) {
candidates.add(new CandidateInfoExtra(
c.getText(R.string.edge_to_edge_navigation_title),
c.getText(R.string.edge_to_edge_navigation_summary),
@@ -344,7 +345,7 @@ public class SystemNavigationGestureSettings extends RadioButtonPickerFragment i
@Override
protected boolean isPageSearchEnabled(Context context) {
return SystemNavigationPreferenceController.isGestureAvailable(context);
return true;
}
@Override
@@ -354,7 +355,8 @@ public class SystemNavigationGestureSettings extends RadioButtonPickerFragment i
final List<SearchIndexableRaw> result = new ArrayList<>();
if (SystemNavigationPreferenceController.isOverlayPackageAvailable(context,
NAV_BAR_MODE_GESTURAL_OVERLAY)) {
NAV_BAR_MODE_GESTURAL_OVERLAY) &&
SystemNavigationPreferenceController.isGestureAvailable(context)) {
SearchIndexableRaw data = new SearchIndexableRaw(context);
data.title = res.getString(R.string.edge_to_edge_navigation_title);
data.key = KEY_SYSTEM_NAV_GESTURAL;

View File

@@ -42,7 +42,7 @@ public class SystemNavigationPreferenceController extends BasePreferenceControll
@Override
public int getAvailabilityStatus() {
return isGestureAvailable(mContext) ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
return AVAILABLE;
}
@Override