Loading packages/SettingsLib/src/com/android/settingslib/net/DataUsageController.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -222,7 +222,8 @@ public class DataUsageController { } } } } return TelephonyManager.from(mContext).createForSubscriptionId(subscriptionId); return mContext.getSystemService( TelephonyManager.class).createForSubscriptionId(subscriptionId); } } public void setMobileDataEnabled(boolean enabled) { public void setMobileDataEnabled(boolean enabled) { Loading packages/SettingsLib/tests/robotests/src/com/android/settingslib/net/DataUsageControllerTest.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -75,7 +75,7 @@ public class DataUsageControllerTest { public void setUp() throws RemoteException { public void setUp() throws RemoteException { MockitoAnnotations.initMocks(this); MockitoAnnotations.initMocks(this); when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mTelephonyManager); when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mTelephonyManager); when(mContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(mTelephonyManager); when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager); when(mContext.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE)) when(mContext.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE)) .thenReturn(mSubscriptionManager); .thenReturn(mSubscriptionManager); when(mContext.getSystemService(NetworkStatsManager.class)).thenReturn(mNetworkStatsManager); when(mContext.getSystemService(NetworkStatsManager.class)).thenReturn(mNetworkStatsManager); Loading Loading
packages/SettingsLib/src/com/android/settingslib/net/DataUsageController.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -222,7 +222,8 @@ public class DataUsageController { } } } } return TelephonyManager.from(mContext).createForSubscriptionId(subscriptionId); return mContext.getSystemService( TelephonyManager.class).createForSubscriptionId(subscriptionId); } } public void setMobileDataEnabled(boolean enabled) { public void setMobileDataEnabled(boolean enabled) { Loading
packages/SettingsLib/tests/robotests/src/com/android/settingslib/net/DataUsageControllerTest.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -75,7 +75,7 @@ public class DataUsageControllerTest { public void setUp() throws RemoteException { public void setUp() throws RemoteException { MockitoAnnotations.initMocks(this); MockitoAnnotations.initMocks(this); when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mTelephonyManager); when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mTelephonyManager); when(mContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(mTelephonyManager); when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager); when(mContext.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE)) when(mContext.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE)) .thenReturn(mSubscriptionManager); .thenReturn(mSubscriptionManager); when(mContext.getSystemService(NetworkStatsManager.class)).thenReturn(mNetworkStatsManager); when(mContext.getSystemService(NetworkStatsManager.class)).thenReturn(mNetworkStatsManager); Loading