Merge "'Mobile plan' is searchable even if it is unavailable" am: a3f9f42b71
am: 2c73cc8ca8
am: 2010c175a6
am: 2d23561a25
am: c68d307ca8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2625935 Change-Id: I7b52296963a9e838863808db52675f454951ace3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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;
|
||||||
|
@@ -181,5 +181,17 @@ public class NetworkDashboardFragment extends DashboardFragment implements
|
|||||||
null /* metricsFeatureProvider */, null /* fragment */,
|
null /* metricsFeatureProvider */, null /* fragment */,
|
||||||
null /* mobilePlanHost */, null /* LifecycleOwner */);
|
null /* mobilePlanHost */, null /* LifecycleOwner */);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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