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

Commit f56b2588 authored by SongFerngWang's avatar SongFerngWang
Browse files

Fix bug: TestServiceState can't fake nr_state,data_roaming,voice_roaming

Bug: 150665011
Test: test adb commadn work:
adb shell am broadcast -a com.android.internal.telephony.TestServiceState \
--ei nr_state 3

Change-Id: I9c216a8d0c0f4f2af9b0d749e68d34ea971b3ab9
Merged-In: I9c216a8d0c0f4f2af9b0d749e68d34ea971b3ab9
parent 844e827f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -401,6 +401,7 @@ public class TelephonyTester {
            }
            nri.setNrState(mServiceStateTestIntent.getIntExtra(EXTRA_NR_STATE,
                    NetworkRegistrationInfo.NR_STATE_NONE));
            ss.addNetworkRegistrationInfo(nri);
            log("Override NR state with " + ss.getNrState());
        }
        if (mServiceStateTestIntent.hasExtra(EXTRA_VOICE_RAT)) {
@@ -444,6 +445,7 @@ public class TelephonyTester {
            }
            nri.setRoamingType(mServiceStateTestIntent.getIntExtra(EXTRA_VOICE_ROAMING_TYPE,
                    ServiceState.ROAMING_TYPE_UNKNOWN));
            ss.addNetworkRegistrationInfo(nri);
            log("Override voice roaming type with " + ss.getVoiceRoamingType());
        }
        if (mServiceStateTestIntent.hasExtra(EXTRA_DATA_ROAMING_TYPE)) {
@@ -457,6 +459,7 @@ public class TelephonyTester {
            }
            nri.setRoamingType(mServiceStateTestIntent.getIntExtra(EXTRA_DATA_ROAMING_TYPE,
                    ServiceState.ROAMING_TYPE_UNKNOWN));
            ss.addNetworkRegistrationInfo(nri);
            log("Override data roaming type with " + ss.getDataRoamingType());
        }
    }