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

Commit 50e8eab4 authored by David Magno's avatar David Magno
Browse files

'Mobile plan' is searchable even if it is unavailable

'Mobile plan' yields a search hit event though the 'Mobile plan'
setting is unavailable on the device.

Bug: 287198186
Test: Manual
Change-Id: Ibc6f01602a364ae902f8a6ce15083890e89446d2
parent 286344d5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ public class MobilePlanPreferenceController extends AbstractPreferenceController
    public static final int MANAGE_MOBILE_PLAN_DIALOG_ID = 1;

    private static final String TAG = "MobilePlanPrefContr";
    private static final String KEY_MANAGE_MOBILE_PLAN = "manage_mobile_plan";
    static final String KEY_MANAGE_MOBILE_PLAN = "manage_mobile_plan";
    private static final String SAVED_MANAGE_MOBILE_PLAN_MSG = "mManageMobilePlanMessage";

    private final UserManager mUserManager;
+12 −0
Original line number Diff line number Diff line
@@ -174,5 +174,17 @@ public class NetworkDashboardFragment extends DashboardFragment implements
                            null /* metricsFeatureProvider */, null /* fragment */,
                            null /* mobilePlanHost */);
                }

                @Override
                public List<String> getNonIndexableKeys(Context context) {
                    final List<String> keys = super.getNonIndexableKeys(context);

                    MobilePlanPreferenceController mppc =
                            new MobilePlanPreferenceController(context, null);
                    if (!mppc.isAvailable()) {
                        keys.add(MobilePlanPreferenceController.KEY_MANAGE_MOBILE_PLAN);
                    }
                    return keys;
                }
            };
}