Merge "Hide WFC settings if WFC is not provisioned (and provisioning is required)" into nyc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4f3a7589bc
@@ -356,7 +356,8 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
|
|||||||
|
|
||||||
// update WFC setting
|
// update WFC setting
|
||||||
final Context context = getActivity();
|
final Context context = getActivity();
|
||||||
if (ImsManager.isWfcEnabledByPlatform(context)) {
|
if (ImsManager.isWfcEnabledByPlatform(context) &&
|
||||||
|
ImsManager.isWfcProvisionedOnDevice(context)) {
|
||||||
getPreferenceScreen().addPreference(mButtonWfc);
|
getPreferenceScreen().addPreference(mButtonWfc);
|
||||||
|
|
||||||
mButtonWfc.setSummary(WifiCallingSettings.getWfcModeSummary(
|
mButtonWfc.setSummary(WifiCallingSettings.getWfcModeSummary(
|
||||||
@@ -473,7 +474,8 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
|
|||||||
result.add(KEY_TETHER_SETTINGS);
|
result.add(KEY_TETHER_SETTINGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ImsManager.isWfcEnabledByPlatform(context)) {
|
if (!ImsManager.isWfcEnabledByPlatform(context) ||
|
||||||
|
!ImsManager.isWfcProvisionedOnDevice(context)) {
|
||||||
result.add(KEY_WFC_SETTINGS);
|
result.add(KEY_WFC_SETTINGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -78,7 +78,8 @@ public class SuggestionsChecks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isWifiCallingUnavailableOrEnabled() {
|
public boolean isWifiCallingUnavailableOrEnabled() {
|
||||||
if (!ImsManager.isWfcEnabledByPlatform(mContext)) {
|
if (!ImsManager.isWfcEnabledByPlatform(mContext) ||
|
||||||
|
!ImsManager.isWfcProvisionedOnDevice(mContext)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return ImsManager.isWfcEnabledByUser(mContext)
|
return ImsManager.isWfcEnabledByUser(mContext)
|
||||||
|
Reference in New Issue
Block a user