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

Commit 85e8823f authored by Eric Laurent's avatar Eric Laurent Committed by Gerrit Code Review
Browse files

Merge "ToneGenerator: fix dual sim ringback tone"

parents 17b12f38 eae07a40
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -864,6 +864,13 @@ ToneGenerator::ToneGenerator(audio_stream_type_t streamType, float volume, bool
    if (property_get("gsm.operator.iso-country", value, "") == 0) {
        property_get("gsm.sim.operator.iso-country", value, "");
    }
    // If dual sim device has two SIM cards inserted and is not registerd to any network,
    // "," is set to "gsm.operator.iso-country" prop.
    // In this case, "gsm.sim.operator.iso-country" prop should be used.
    if (strlen(value) == 1 && strstr(value, ",") != NULL) {
        property_get("gsm.sim.operator.iso-country", value, "");
    }

    if (strstr(value, "us") != NULL ||
        strstr(value, "ca") != NULL) {
        mRegion = ANSI;