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

Commit 21fe62ac authored by duho.ro's avatar duho.ro Committed by Vineeta Srivastava
Browse files

telephony: redirect call barring MMI code to other purpose

Some operators redirect call barring MMI codes to other purpose.
For instance, *333# should be processed as USSD code with Indonesia
Axis SIM and Indonesia Hutchison SIM.  This change is adding an array
for call barring MMI code to config.xml. So, we can redefine the array
for redirecting the call barring MMI codes. The MMI code is compared
with the call barring MMI codes from config.xml.

Bug: 10101303

Change-Id: Ib21540a90c64e105cd4bc1864238329d594cd056
parent 1260f1c6
Loading
Loading
Loading
Loading
+12 −9
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.internal.telephony.gsm;
package com.android.internal.telephony.gsm;


import android.content.Context;
import android.content.Context;
import android.content.res.Resources;
import com.android.internal.telephony.*;
import com.android.internal.telephony.*;
import com.android.internal.telephony.uicc.IccRecords;
import com.android.internal.telephony.uicc.IccRecords;
import com.android.internal.telephony.uicc.UiccCardApplication;
import com.android.internal.telephony.uicc.UiccCardApplication;
@@ -361,15 +362,17 @@ public final class GsmMmiCode extends Handler implements MmiCode {


    static boolean
    static boolean
    isServiceCodeCallBarring(String sc) {
    isServiceCodeCallBarring(String sc) {
        return sc != null &&
        Resources resource = Resources.getSystem();
                (sc.equals(SC_BAOC)
        if (sc != null) {
                || sc.equals(SC_BAOIC)
            String[] barringMMI = resource.getStringArray(
                || sc.equals(SC_BAOICxH)
                com.android.internal.R.array.config_callBarringMMI);
                || sc.equals(SC_BAIC)
            if (barringMMI != null) {
                || sc.equals(SC_BAICr)
                for (String match : barringMMI) {
                || sc.equals(SC_BA_ALL)
                    if (sc.equals(match)) return true;
                || sc.equals(SC_BA_MO)
                }
                || sc.equals(SC_BA_MT));
            }
        }
        return false;
    }
    }


    static String
    static String