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

Commit a8f2ace6 authored by Sandeep Kunta's avatar Sandeep Kunta Committed by Ethan Chen
Browse files

Add support to send dtmf for SCH tone

Add methods to send/stop dtmf as per subscription.

Change-Id: Ia17a733bd6ec1cd0163024d12c021e1e21032078
CRs-Fixed: 610582
parent 6ee95d80
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -2285,4 +2285,12 @@ public class CallManager {
    public void deactivateLchState(int sub) {
    public void deactivateLchState(int sub) {
        Rlog.e(LOG_TAG, " deactivateLchState not supported");
        Rlog.e(LOG_TAG, " deactivateLchState not supported");
    }
    }

    public void startDtmf(char c, int subscription) {
        Rlog.e(LOG_TAG, " startDtmf not supported for subscription");
    }

    public void stopDtmf(int subscription) {
        Rlog.e(LOG_TAG, " stopDtmf not supported for subscription");
    }
}
}
+10 −0
Original line number Original line Diff line number Diff line
@@ -970,6 +970,16 @@ public class ExtCallManager extends CallManager {
        return false;
        return false;
    }
    }


    @Override
    public void startDtmf(char c, int subscription) {
        getPhone(subscription).startDtmf(c);
    }

    @Override
    public void stopDtmf(int subscription) {
        getPhone(subscription).stopDtmf();
    }

    @Override
    @Override
    public void registerForSubscriptionChange(Handler h, int what, Object obj) {
    public void registerForSubscriptionChange(Handler h, int what, Object obj) {
        mActiveSubChangeRegistrants.addUnique(h, what, obj);
        mActiveSubChangeRegistrants.addUnique(h, what, obj);
+1 −1
Original line number Original line Diff line number Diff line
@@ -765,7 +765,7 @@ public class CDMAPhone extends PhoneBase {


    @Override
    @Override
    public void startDtmf(char c) {
    public void startDtmf(char c) {
        if (!PhoneNumberUtils.is12Key(c)) {
        if (!(PhoneNumberUtils.is12Key(c) || (c >= 'A' && c <= 'D'))) {
            Rlog.e(LOG_TAG,
            Rlog.e(LOG_TAG,
                    "startDtmf called with invalid character '" + c + "'");
                    "startDtmf called with invalid character '" + c + "'");
        } else {
        } else {
+1 −1
Original line number Original line Diff line number Diff line
@@ -852,7 +852,7 @@ public class GSMPhone extends PhoneBase {
    @Override
    @Override
    public void
    public void
    startDtmf(char c) {
    startDtmf(char c) {
        if (!PhoneNumberUtils.is12Key(c)) {
        if (!(PhoneNumberUtils.is12Key(c) || (c >= 'A' && c <= 'D'))) {
            Rlog.e(LOG_TAG,
            Rlog.e(LOG_TAG,
                "startDtmf called with invalid character '" + c + "'");
                "startDtmf called with invalid character '" + c + "'");
        } else {
        } else {