Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33713090 authored by Amit Mahajan's avatar Amit Mahajan Committed by android-build-merger
Browse files

Merge "Revert "Clean up getPhoneCount in PhoneFactory#makeDefaultPhone"" am:...

Merge "Revert "Clean up getPhoneCount in PhoneFactory#makeDefaultPhone"" am: accf0ed9 am: 94804a45 am: e348b84b
am: e9742071

Change-Id: I1bd24cabedf74424bed5eef5378b9210c3fb586c
parents b4b7c1c4 e9742071
Loading
Loading
Loading
Loading
+3 −7
Original line number Original line Diff line number Diff line
@@ -148,9 +148,7 @@ public class PhoneFactory {
                /* In case of multi SIM mode two instances of Phone, RIL are created,
                /* In case of multi SIM mode two instances of Phone, RIL are created,
                   where as in single SIM mode only instance. isMultiSimEnabled() function checks
                   where as in single SIM mode only instance. isMultiSimEnabled() function checks
                   whether it is single SIM or multi SIM mode */
                   whether it is single SIM or multi SIM mode */
                TelephonyManager tm = (TelephonyManager) context.getSystemService(
                int numPhones = TelephonyManager.getDefault().getPhoneCount();
                        Context.TELEPHONY_SERVICE);
                int numPhones = tm.getPhoneCount();


                int[] networkModes = new int[numPhones];
                int[] networkModes = new int[numPhones];
                sPhones = new Phone[numPhones];
                sPhones = new Phone[numPhones];
@@ -203,10 +201,8 @@ public class PhoneFactory {
                // Set the default phone in base class.
                // Set the default phone in base class.
                // FIXME: This is a first best guess at what the defaults will be. It
                // FIXME: This is a first best guess at what the defaults will be. It
                // FIXME: needs to be done in a more controlled manner in the future.
                // FIXME: needs to be done in a more controlled manner in the future.
                if (numPhones > 0) {
                sPhone = sPhones[0];
                sPhone = sPhones[0];
                sCommandsInterface = sCommandsInterfaces[0];
                sCommandsInterface = sCommandsInterfaces[0];
                }


                // Ensure that we have a default SMS app. Requesting the app with
                // Ensure that we have a default SMS app. Requesting the app with
                // updateIfNeeded set to true is enough to configure a default SMS app.
                // updateIfNeeded set to true is enough to configure a default SMS app.