Merge "Hide WFC settings if WFC is not provisioned (and provisioning is required)" into nyc-mr1-dev

This commit is contained in:
TreeHugger Robot
2016-06-21 17:58:25 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 3 deletions

View File

@@ -356,7 +356,8 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
// update WFC setting
final Context context = getActivity();
if (ImsManager.isWfcEnabledByPlatform(context)) {
if (ImsManager.isWfcEnabledByPlatform(context) &&
ImsManager.isWfcProvisionedOnDevice(context)) {
getPreferenceScreen().addPreference(mButtonWfc);
mButtonWfc.setSummary(WifiCallingSettings.getWfcModeSummary(
@@ -473,7 +474,8 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
result.add(KEY_TETHER_SETTINGS);
}
if (!ImsManager.isWfcEnabledByPlatform(context)) {
if (!ImsManager.isWfcEnabledByPlatform(context) ||
!ImsManager.isWfcProvisionedOnDevice(context)) {
result.add(KEY_WFC_SETTINGS);
}

View File

@@ -78,7 +78,8 @@ public class SuggestionsChecks {
}
public boolean isWifiCallingUnavailableOrEnabled() {
if (!ImsManager.isWfcEnabledByPlatform(mContext)) {
if (!ImsManager.isWfcEnabledByPlatform(mContext) ||
!ImsManager.isWfcProvisionedOnDevice(mContext)) {
return true;
}
return ImsManager.isWfcEnabledByUser(mContext)