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

Commit 9958ac7f authored by Sehee Park's avatar Sehee Park Committed by Jack Yu
Browse files

Verify package name from carrierConfig for bindService



PACKAGE_OVERRIDE_STRING from carrierConfig is not null
but empty by default. Empty string is used instead of
"com.android.phone" by default. It cause bind error.

Bug: 119584293
Test: Manual

Change-Id: I0156477edf1722c1c4872f3f252a146a84c8e076
Signed-off-by: default avatarSehee Park <sehee32.park@samsung.com>
parent 54bc6290
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import android.telephony.INetworkServiceCallback;
import android.telephony.NetworkRegistrationState;
import android.telephony.NetworkService;
import android.telephony.Rlog;
import android.text.TextUtils;

import java.util.Hashtable;
import java.util.Map;
@@ -218,7 +219,7 @@ public class NetworkRegistrationManager {

        PersistableBundle b = mCarrierConfigManager.getConfigForSubId(mPhone.getSubId());

        if (b != null) {
        if (b != null && !TextUtils.isEmpty(b.getString(carrierConfig))) {
            // If carrier config overrides it, use the one from carrier config
            packageName = b.getString(carrierConfig, packageName);
        }
+1 −1
Original line number Diff line number Diff line
@@ -327,7 +327,7 @@ public class DataServiceManager {

        PersistableBundle b = mCarrierConfigManager.getConfigForSubId(mPhone.getSubId());

        if (b != null) {
        if (b != null && !TextUtils.isEmpty(b.getString(carrierConfig))) {
            // If carrier config overrides it, use the one from carrier config
            packageName = b.getString(carrierConfig, packageName);
        }