Loading src/java/com/android/internal/telephony/RIL.java +3 −4 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ import android.hardware.radio.V1_4.CarrierRestrictionsWithPriority; import android.hardware.radio.V1_4.SimLockMultiSimPolicy; import android.hardware.radio.V1_5.AccessNetwork; import android.hardware.radio.deprecated.V1_0.IOemHook; import android.net.ConnectivityManager; import android.net.KeepalivePacketData; import android.net.LinkAddress; import android.net.LinkProperties; Loading Loading @@ -609,9 +608,9 @@ public class RIL extends BaseCommands implements CommandsInterface { mRadioBugDetector = new RadioBugDetector(context, mPhoneId); } ConnectivityManager cm = (ConnectivityManager)context.getSystemService( Context.CONNECTIVITY_SERVICE); mIsMobileNetworkSupported = cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE); TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService( Context.TELEPHONY_SERVICE); mIsMobileNetworkSupported = telephonyManager.isDataCapable(); mRadioResponse = new RadioResponse(this); mRadioIndication = new RadioIndication(this); Loading tests/telephonytests/src/com/android/internal/telephony/RILTest.java +5 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,8 @@ public class RILTest extends TelephonyTest { @Mock private ConnectivityManager mConnectionManager; @Mock private TelephonyManager mTelephonyManager; @Mock private IRadio mRadioProxy; @Mock private IOemHook mOemHookProxy; Loading Loading @@ -271,6 +273,9 @@ public class RILTest extends TelephonyTest { .isNetworkSupported(ConnectivityManager.TYPE_MOBILE); doReturn(mConnectionManager).when(context) .getSystemService(Context.CONNECTIVITY_SERVICE); doReturn(mTelephonyManager).when(context) .getSystemService(Context.TELEPHONY_SERVICE); doReturn(true).when(mTelephonyManager).isDataCapable(); PowerManager powerManager = new PowerManager(context, mock(IPowerManager.class), new Handler(Looper.myLooper())); doReturn(powerManager).when(context).getSystemService(Context.POWER_SERVICE); Loading Loading
src/java/com/android/internal/telephony/RIL.java +3 −4 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ import android.hardware.radio.V1_4.CarrierRestrictionsWithPriority; import android.hardware.radio.V1_4.SimLockMultiSimPolicy; import android.hardware.radio.V1_5.AccessNetwork; import android.hardware.radio.deprecated.V1_0.IOemHook; import android.net.ConnectivityManager; import android.net.KeepalivePacketData; import android.net.LinkAddress; import android.net.LinkProperties; Loading Loading @@ -609,9 +608,9 @@ public class RIL extends BaseCommands implements CommandsInterface { mRadioBugDetector = new RadioBugDetector(context, mPhoneId); } ConnectivityManager cm = (ConnectivityManager)context.getSystemService( Context.CONNECTIVITY_SERVICE); mIsMobileNetworkSupported = cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE); TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService( Context.TELEPHONY_SERVICE); mIsMobileNetworkSupported = telephonyManager.isDataCapable(); mRadioResponse = new RadioResponse(this); mRadioIndication = new RadioIndication(this); Loading
tests/telephonytests/src/com/android/internal/telephony/RILTest.java +5 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,8 @@ public class RILTest extends TelephonyTest { @Mock private ConnectivityManager mConnectionManager; @Mock private TelephonyManager mTelephonyManager; @Mock private IRadio mRadioProxy; @Mock private IOemHook mOemHookProxy; Loading Loading @@ -271,6 +273,9 @@ public class RILTest extends TelephonyTest { .isNetworkSupported(ConnectivityManager.TYPE_MOBILE); doReturn(mConnectionManager).when(context) .getSystemService(Context.CONNECTIVITY_SERVICE); doReturn(mTelephonyManager).when(context) .getSystemService(Context.TELEPHONY_SERVICE); doReturn(true).when(mTelephonyManager).isDataCapable(); PowerManager powerManager = new PowerManager(context, mock(IPowerManager.class), new Handler(Looper.myLooper())); doReturn(powerManager).when(context).getSystemService(Context.POWER_SERVICE); Loading