Loading src/java/com/android/ims/ImsManager.java +11 −17 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import android.os.PersistableBundle; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemProperties; import android.provider.Settings; import android.telecom.TelecomManager; import android.telephony.AccessNetworkConstants; import android.telephony.CarrierConfigManager; Loading Loading @@ -2039,22 +2040,21 @@ public class ImsManager implements IFeatureConnector { } public boolean updateRttConfigValue() { // If there's no active sub anywhere on the device, enable RTT on the modem so that // the device can make an emergency call. boolean isCarrierSupported = getBooleanCarrierConfig(CarrierConfigManager.KEY_RTT_SUPPORTED_BOOL); boolean isRttUiSettingEnabled = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.RTT_CALLING_MODE, 0) != 0; boolean isRttAlwaysOnCarrierConfig = getBooleanCarrierConfig( CarrierConfigManager.KEY_IGNORE_RTT_MODE_SETTING_BOOL); boolean isActiveSubscriptionPresent = isActiveSubscriptionPresent(); boolean shouldImsRttBeOn = isRttUiSettingEnabled || isRttAlwaysOnCarrierConfig; logi("update RTT: settings value: " + isRttUiSettingEnabled + " always-on carrierconfig: " + isRttAlwaysOnCarrierConfig); logi("update RTT: is carrier enabled: " + isCarrierSupported + "; is active sub present: " + isActiveSubscriptionPresent); if (isCarrierSupported || !isActiveSubscriptionPresent) { setRttConfig(true); return true; if (isCarrierSupported) { setRttConfig(shouldImsRttBeOn); } return false; return isCarrierSupported && shouldImsRttBeOn; } private void setRttConfig(boolean enabled) { Loading Loading @@ -2712,12 +2712,6 @@ public class ImsManager implements IFeatureConnector { subId != SubscriptionManager.DEFAULT_SUBSCRIPTION_ID; } private boolean isActiveSubscriptionPresent() { SubscriptionManager sm = (SubscriptionManager) mContext.getSystemService( Context.TELEPHONY_SUBSCRIPTION_SERVICE); return sm.getActiveSubscriptionIdList().length > 0; } private void updateImsCarrierConfigs(PersistableBundle configs) throws ImsException { checkAndThrowExceptionIfServiceUnavailable(); Loading Loading
src/java/com/android/ims/ImsManager.java +11 −17 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import android.os.PersistableBundle; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemProperties; import android.provider.Settings; import android.telecom.TelecomManager; import android.telephony.AccessNetworkConstants; import android.telephony.CarrierConfigManager; Loading Loading @@ -2039,22 +2040,21 @@ public class ImsManager implements IFeatureConnector { } public boolean updateRttConfigValue() { // If there's no active sub anywhere on the device, enable RTT on the modem so that // the device can make an emergency call. boolean isCarrierSupported = getBooleanCarrierConfig(CarrierConfigManager.KEY_RTT_SUPPORTED_BOOL); boolean isRttUiSettingEnabled = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.RTT_CALLING_MODE, 0) != 0; boolean isRttAlwaysOnCarrierConfig = getBooleanCarrierConfig( CarrierConfigManager.KEY_IGNORE_RTT_MODE_SETTING_BOOL); boolean isActiveSubscriptionPresent = isActiveSubscriptionPresent(); boolean shouldImsRttBeOn = isRttUiSettingEnabled || isRttAlwaysOnCarrierConfig; logi("update RTT: settings value: " + isRttUiSettingEnabled + " always-on carrierconfig: " + isRttAlwaysOnCarrierConfig); logi("update RTT: is carrier enabled: " + isCarrierSupported + "; is active sub present: " + isActiveSubscriptionPresent); if (isCarrierSupported || !isActiveSubscriptionPresent) { setRttConfig(true); return true; if (isCarrierSupported) { setRttConfig(shouldImsRttBeOn); } return false; return isCarrierSupported && shouldImsRttBeOn; } private void setRttConfig(boolean enabled) { Loading Loading @@ -2712,12 +2712,6 @@ public class ImsManager implements IFeatureConnector { subId != SubscriptionManager.DEFAULT_SUBSCRIPTION_ID; } private boolean isActiveSubscriptionPresent() { SubscriptionManager sm = (SubscriptionManager) mContext.getSystemService( Context.TELEPHONY_SUBSCRIPTION_SERVICE); return sm.getActiveSubscriptionIdList().length > 0; } private void updateImsCarrierConfigs(PersistableBundle configs) throws ImsException { checkAndThrowExceptionIfServiceUnavailable(); Loading