Loading src/java/com/android/internal/telephony/PhoneConfigurationManager.java +26 −16 Original line number Diff line number Diff line Loading @@ -22,10 +22,12 @@ import static android.telephony.TelephonyManager.EXTRA_ACTIVE_SIM_SUPPORTED_COUN import android.content.Context; import android.content.Intent; import android.os.AsyncResult; import android.os.Build; import android.os.Handler; import android.os.Message; import android.os.PowerManager; import android.os.RegistrantList; import android.os.SystemProperties; import android.os.storage.StorageManager; import android.sysprop.TelephonyProperties; import android.telephony.PhoneCapability; Loading Loading @@ -70,7 +72,8 @@ public class PhoneConfigurationManager { private MockableInterface mMi = new MockableInterface(); private TelephonyManager mTelephonyManager; private static final RegistrantList sMultiSimConfigChangeRegistrants = new RegistrantList(); private static final String ALLOW_MOCK_MODEM_PROPERTY = "persist.radio.allow_mock_modem"; private static final boolean DEBUG = !"user".equals(Build.TYPE); /** * Init method to instantiate the object * Should only be called once. Loading Loading @@ -457,7 +460,10 @@ public class PhoneConfigurationManager { log("setModemService: " + serviceName); boolean statusRadioConfig = false; boolean statusRil = false; final boolean isAllowed = SystemProperties.getBoolean(ALLOW_MOCK_MODEM_PROPERTY, false); // Check for ALLOW_MOCK_MODEM_PROPERTY on user builds if (isAllowed || DEBUG) { if (serviceName != null) { // Only CTS mock modem service is allowed to swith. if (!serviceName.equals(CTS_MOCK_MODEM_SERVICE)) { Loading @@ -477,6 +483,10 @@ public class PhoneConfigurationManager { } return statusRadioConfig && statusRil; } else { loge("setModemService is not allowed"); return false; } } /** Loading Loading
src/java/com/android/internal/telephony/PhoneConfigurationManager.java +26 −16 Original line number Diff line number Diff line Loading @@ -22,10 +22,12 @@ import static android.telephony.TelephonyManager.EXTRA_ACTIVE_SIM_SUPPORTED_COUN import android.content.Context; import android.content.Intent; import android.os.AsyncResult; import android.os.Build; import android.os.Handler; import android.os.Message; import android.os.PowerManager; import android.os.RegistrantList; import android.os.SystemProperties; import android.os.storage.StorageManager; import android.sysprop.TelephonyProperties; import android.telephony.PhoneCapability; Loading Loading @@ -70,7 +72,8 @@ public class PhoneConfigurationManager { private MockableInterface mMi = new MockableInterface(); private TelephonyManager mTelephonyManager; private static final RegistrantList sMultiSimConfigChangeRegistrants = new RegistrantList(); private static final String ALLOW_MOCK_MODEM_PROPERTY = "persist.radio.allow_mock_modem"; private static final boolean DEBUG = !"user".equals(Build.TYPE); /** * Init method to instantiate the object * Should only be called once. Loading Loading @@ -457,7 +460,10 @@ public class PhoneConfigurationManager { log("setModemService: " + serviceName); boolean statusRadioConfig = false; boolean statusRil = false; final boolean isAllowed = SystemProperties.getBoolean(ALLOW_MOCK_MODEM_PROPERTY, false); // Check for ALLOW_MOCK_MODEM_PROPERTY on user builds if (isAllowed || DEBUG) { if (serviceName != null) { // Only CTS mock modem service is allowed to swith. if (!serviceName.equals(CTS_MOCK_MODEM_SERVICE)) { Loading @@ -477,6 +483,10 @@ public class PhoneConfigurationManager { } return statusRadioConfig && statusRil; } else { loge("setModemService is not allowed"); return false; } } /** Loading