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

Commit ef5ac8fb authored by Jayachandran Chinnakkannu's avatar Jayachandran Chinnakkannu Committed by android-build-merger
Browse files

Merge "Remove usage of Telephonymanager from() hidden API" am: 8e999f22 am: fc8b731e

am: 4931429f

Change-Id: Idcd6527f87f8e61e8aba94fa287522e497934f6f
parents d2dca73d 4931429f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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) {
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ public class DataUsageControllerTest {
    public void setUp() throws RemoteException {
        MockitoAnnotations.initMocks(this);
        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))
                .thenReturn(mSubscriptionManager);
        when(mContext.getSystemService(NetworkStatsManager.class)).thenReturn(mNetworkStatsManager);