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

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

Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs"...

Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs" am: 1dc2a0d7 am: 7798357a
am: 6906046f

Change-Id: If229255c7cc7af4ca1e8de7c6a2e493b3d6aafc3
parents eb5ce010 6906046f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -445,7 +445,7 @@ class BatteryExternalStatsWorker implements BatteryStatsImpl.ExternalStatsSync {
        if ((updateFlags & BatteryStatsImpl.ExternalStatsSync.UPDATE_RADIO) != 0) {
            // We were asked to fetch Telephony data.
            if (mTelephony == null) {
                mTelephony = TelephonyManager.from(mContext);
                mTelephony = mContext.getSystemService(TelephonyManager.class);
            }

            if (mTelephony != null) {
+1 −1
Original line number Diff line number Diff line
@@ -731,7 +731,7 @@ public final class BatteryStatsService extends IBatteryStats.Stub

    public void notePhoneState(int state) {
        enforceCallingPermission();
        int simState = TelephonyManager.getDefault().getSimState();
        int simState = mContext.getSystemService(TelephonyManager.class).getSimState();
        synchronized (mStats) {
            mStats.notePhoneStateLocked(state, simState);
        }