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

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

Merge "Remove usage of ITelecomService.getCallState() hidden API" am: b93721ef am: 3959d1af

am: 724e258f

Change-Id: I980f29241e67d8f08002d1e96e7c61ee5c9e69a4
parents 626fdc48 724e258f
Loading
Loading
Loading
Loading
+4 −14
Original line number Diff line number Diff line
@@ -86,7 +86,6 @@ import android.util.Pair;

import com.android.ims.internal.IImsServiceFeatureCallback;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telecom.ITelecomService;
import com.android.internal.telephony.CellNetworkScanResult;
import com.android.internal.telephony.INumberVerificationCallback;
import com.android.internal.telephony.IOns;
@@ -5176,13 +5175,11 @@ public class TelephonyManager {
     * @return the current call state.
     */
    public @CallState int getCallState() {
        try {
            ITelecomService telecom = getTelecomService();
            if (telecom != null) {
                return telecom.getCallState();
        if (mContext != null) {
            TelecomManager telecomManager = mContext.getSystemService(TelecomManager.class);
            if (telecomManager != null) {
                return telecomManager.getCallState();
            }
        } catch (RemoteException e) {
            Log.e(TAG, "Error calling ITelecomService#getCallState", e);
        }
        return CALL_STATE_IDLE;
    }
@@ -5341,13 +5338,6 @@ public class TelephonyManager {
        return ITelephony.Stub.asInterface(ServiceManager.getService(Context.TELEPHONY_SERVICE));
    }

    /**
    * @hide
    */
    private ITelecomService getTelecomService() {
        return ITelecomService.Stub.asInterface(ServiceManager.getService(TELECOM_SERVICE));
    }

    private ITelephonyRegistry getTelephonyRegistry() {
        return ITelephonyRegistry.Stub.asInterface(ServiceManager.getService("telephony.registry"));
    }