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

Commit 365f55ef authored by shaoweishen's avatar shaoweishen
Browse files

[PK Setting] update searchable if page is not visible

if PK setting is not available, also make it not searchable.

Test: verified on device
Bug: 301881819
Change-Id: I6e71634ce5ddc6d5db3d31f5614fef7ccabc6d3d
parent 6bb2c735
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -58,7 +58,8 @@ public class ModifierKeysSettings extends DashboardFragment {
                protected boolean isPageSearchEnabled(Context context) {
                protected boolean isPageSearchEnabled(Context context) {
                    return FeatureFlagUtils
                    return FeatureFlagUtils
                            .isEnabled(
                            .isEnabled(
                                    context, FeatureFlagUtils.SETTINGS_NEW_KEYBOARD_MODIFIER_KEY);
                                    context, FeatureFlagUtils.SETTINGS_NEW_KEYBOARD_MODIFIER_KEY)
                            && !PhysicalKeyboardFragment.getHardKeyboards(context).isEmpty();
                }
                }
            };
            };
}
}
+5 −0
Original line number Original line Diff line number Diff line
@@ -474,5 +474,10 @@ public final class PhysicalKeyboardFragment extends SettingsPreferenceFragment
                    sir.xmlResId = R.xml.physical_keyboard_settings;
                    sir.xmlResId = R.xml.physical_keyboard_settings;
                    return Arrays.asList(sir);
                    return Arrays.asList(sir);
                }
                }

                @Override
                protected boolean isPageSearchEnabled(Context context) {
                    return !getHardKeyboards(context).isEmpty();
                }
            };
            };
}
}