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

Commit c1bcd7c7 authored by justinweng's avatar justinweng Committed by George Gao
Browse files

hal: always check operator numeric



If user inserted a TMUS SIM and make the first call. Even user replaces
another SIM, HAL will keep to use TMUS audio table.

If user inserted a general SIM and make the first call. Even user
replaces a TMUS SIM, HAL will not use TMUS audio table.

Bug: 133648439
Test: make a call

Change-Id: Ie7b9455ef31c9dd6826236df41965b1d96d75892
Signed-off-by: default avatarjustinweng <justinweng@google.com>
(cherry picked from commit a47c7f71de1770d57179d3b03d58ced37c3a4234)
Signed-off-by: default avatarAniket Kumar Lata <alata@codeaurora.org>
parent d5395158
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -1525,9 +1525,6 @@ static int msm_be_id_array_len =
#define ULL_PLATFORM_DELAY         (3*1000LL)
#define MMAP_PLATFORM_DELAY        (3*1000LL)

static pthread_once_t check_op_once_ctl = PTHREAD_ONCE_INIT;
static bool is_tmus = false;

static bool is_usb_snd_dev(snd_device_t snd_device)
{
    if (snd_device < SND_DEVICE_IN_BEGIN) {
@@ -1549,7 +1546,7 @@ static bool is_usb_snd_dev(snd_device_t snd_device)
    return false;
}

static void check_operator()
bool is_operator_tmus()
{
    char value[PROPERTY_VALUE_MAX];
    int mccmnc;
@@ -1574,15 +1571,10 @@ static void check_operator()
    case 310210:
    case 310200:
    case 310160:
        is_tmus = true;
        break;
    }
        return true;
    default:
        return false;
    }

bool is_operator_tmus()
{
    pthread_once(&check_op_once_ctl, check_operator);
    return is_tmus;
}

static char *get_current_operator()