Hide WFC settings if WFC is not provisioned (and provisioning is required)
Bug: 29223318 Change-Id: Ic927e742d84f55ea411a0d034fc1caac72ee58e7
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user