'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
This commit is contained in:
@@ -57,7 +57,7 @@ public class MobilePlanPreferenceController extends AbstractPreferenceController
|
|||||||
public static final int MANAGE_MOBILE_PLAN_DIALOG_ID = 1;
|
public static final int MANAGE_MOBILE_PLAN_DIALOG_ID = 1;
|
||||||
|
|
||||||
private static final String TAG = "MobilePlanPrefContr";
|
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 static final String SAVED_MANAGE_MOBILE_PLAN_MSG = "mManageMobilePlanMessage";
|
||||||
|
|
||||||
private final UserManager mUserManager;
|
private final UserManager mUserManager;
|
||||||
|
@@ -174,5 +174,17 @@ public class NetworkDashboardFragment extends DashboardFragment implements
|
|||||||
null /* metricsFeatureProvider */, null /* fragment */,
|
null /* metricsFeatureProvider */, null /* fragment */,
|
||||||
null /* mobilePlanHost */);
|
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;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user