Loading telephony/java/com/android/internal/telephony/PhoneFactory.java +16 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ import com.android.internal.telephony.gsm.GSMPhone; import com.android.internal.telephony.sip.SipPhone; import com.android.internal.telephony.sip.SipPhoneFactory; import java.lang.reflect.Constructor; /** * {@hide} */ Loading Loading @@ -133,7 +135,20 @@ public class PhoneFactory { Log.i(LOG_TAG, "Cdma Subscription set to " + cdmaSubscription); //reads the system properties and makes commandsinterface sCommandsInterface = new RIL(context, networkMode, cdmaSubscription); String sRILClassname = SystemProperties.get("ro.telephony.ril_class", "RIL"); Log.i(LOG_TAG, "RILClassname is " + sRILClassname); // Use reflection to construct the RIL class (defaults to RIL) try { Class<?> classDefinition = Class.forName("com.android.internal.telephony." + sRILClassname); Constructor<?> constructor = classDefinition.getConstructor(new Class[] {Context.class, int.class, int.class}); sCommandsInterface = (RIL) constructor.newInstance(new Object[] {context, networkMode, cdmaSubscription}); } catch (Exception e) { // 6 different types of exceptions are thrown here that it's // easier to just catch Exception as our "error handling" is the same. Log.wtf(LOG_TAG, "Unable to construct command interface", e); throw new RuntimeException(e); } int phoneType = getPhoneType(networkMode); if (phoneType == Phone.PHONE_TYPE_GSM) { Loading Loading
telephony/java/com/android/internal/telephony/PhoneFactory.java +16 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ import com.android.internal.telephony.gsm.GSMPhone; import com.android.internal.telephony.sip.SipPhone; import com.android.internal.telephony.sip.SipPhoneFactory; import java.lang.reflect.Constructor; /** * {@hide} */ Loading Loading @@ -133,7 +135,20 @@ public class PhoneFactory { Log.i(LOG_TAG, "Cdma Subscription set to " + cdmaSubscription); //reads the system properties and makes commandsinterface sCommandsInterface = new RIL(context, networkMode, cdmaSubscription); String sRILClassname = SystemProperties.get("ro.telephony.ril_class", "RIL"); Log.i(LOG_TAG, "RILClassname is " + sRILClassname); // Use reflection to construct the RIL class (defaults to RIL) try { Class<?> classDefinition = Class.forName("com.android.internal.telephony." + sRILClassname); Constructor<?> constructor = classDefinition.getConstructor(new Class[] {Context.class, int.class, int.class}); sCommandsInterface = (RIL) constructor.newInstance(new Object[] {context, networkMode, cdmaSubscription}); } catch (Exception e) { // 6 different types of exceptions are thrown here that it's // easier to just catch Exception as our "error handling" is the same. Log.wtf(LOG_TAG, "Unable to construct command interface", e); throw new RuntimeException(e); } int phoneType = getPhoneType(networkMode); if (phoneType == Phone.PHONE_TYPE_GSM) { Loading