vendor/mediatek/proprietary/packages/services/Ims/src/com/mediatek/ims/ImsService.java
¦ ¦ ¦ ¦ ¦ ¦ volteRes = res.getBoolean( ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ com.android.internal.R.bool.config_device_volte_available); ¦ ¦ ¦ ¦ ¦ ¦ vilteRes = res.getBoolean( ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ com.android.internal.R.bool.config_device_vt_available); ¦ ¦ ¦ ¦ ¦ ¦ wfcRes = res.getBoolean( ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ com.android.internal.R.bool.config_device_wfc_ims_available); ¦ ¦ ¦ ¦ ¦ } else { ¦ ¦ ¦ ¦ ¦ ¦ // For test SIM cards, forece enable all IMS functions for lab event. ¦ ¦ ¦ ¦ ¦ ¦ Rlog.w(LOG_TAG, "Found test SIM on phone " + phoneId); ¦ ¦ ¦ ¦ ¦ ¦ volteRes = true; ¦ ¦ ¦ ¦ ¦ ¦ vilteRes = true; ¦ ¦ ¦ ¦ ¦ ¦ wfcRes = true; ¦ ¦ ¦ ¦ ¦ } ¦ ¦ ¦ ¦ ¦ Rlog.w(LOG_TAG, "Set volte capability is " + volteRes); ¦ ¦ ¦ ¦ ¦ Rlog.w(LOG_TAG, "Set vilte capability is " + vilteRes); ¦ ¦ ¦ ¦ ¦ Rlog.w(LOG_TAG, "Set wfc capability is " + wfcRes);
--
从log:
1457 1457 D ImsManager: vilte resource value is true, system property is 1, Carrier value is true
在:frameworks/opt/net/ims/src/java/com/android/ims/ImsManager.java中:
¦ String carrier = CarrierConfigManager.KEY_CARRIER_VT_AVAILABLE_BOOL; ¦ boolean isResOverlaySupport = true; ¦ isResOverlaySupport = getIsResOverlaySupport(context, ImsConfig.FeatureConstants.FEATURE_TYPE_VIDEO_OVER_LTE); ¦ log("vilte resource value is " ¦ ¦ + isResOverlaySupport + ", system property is " + SystemProperties.getInt("ro.mtk_vilte_support", 0) ¦ ¦ + ", Carrier value is " + getBooleanCarrierConfig(context, carrier));
--
private static boolean getIsResOverlaySupport(Context context, int feature) { ¦ int mainPhoneId = getMainCapabilityPhoneId(context); ¦ boolean isResOverlaySupport = true; ¦ log("MainCapabilityPhoneId is " + mainPhoneId + " on feature " + feature); ¦ if (SystemProperties.get("persist.mtk_dynamic_ims_switch").equals("1")) { ¦ ¦ try { ¦ ¦ ¦ ImsConfig configInstance = getConfigInterface(mainPhoneId, null, context); ¦ ¦ ¦ if (configInstance != null) { ¦ ¦ ¦ ¦ isResOverlaySupport = configInstance.getImsCapability(feature); ¦ ¦ ¦ } ¦ ¦ } catch (ImsException e) { ¦ ¦ ¦ log("Get volte capability - fail: " + e); ¦ ¦ } ¦ }
在:device/mediatek/common/device.mk中:
PRODUCT_PROPERTY_OVERRIDES += persist.mtk_dynamic_ims_switch=1
;
----