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

Commit cb39f7d5 authored by Jordan Liu's avatar Jordan Liu Committed by Gerrit Code Review
Browse files

Merge "Do not check the carrier config for BrandOverride"

parents e4f4c738 feafab6f
Loading
Loading
Loading
Loading
+1 −15
Original line number Diff line number Diff line
@@ -1457,21 +1457,7 @@ public class UiccProfile extends IccCard {
            return null;
        }
        SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mContext);
        String brandName = sp.getString(OPERATOR_BRAND_OVERRIDE_PREFIX + iccId, null);
        if (brandName == null) {
            // Check if  CarrierConfig sets carrier name
            CarrierConfigManager manager = (CarrierConfigManager)
                    mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE);
            int subId = SubscriptionController.getInstance().getSubIdUsingPhoneId(mPhoneId);
            if (manager != null) {
                PersistableBundle bundle = manager.getConfigForSubId(subId);
                if (bundle != null && bundle.getBoolean(
                        CarrierConfigManager.KEY_CARRIER_NAME_OVERRIDE_BOOL)) {
                    brandName = bundle.getString(CarrierConfigManager.KEY_CARRIER_NAME_STRING);
                }
            }
        }
        return brandName;
        return sp.getString(OPERATOR_BRAND_OVERRIDE_PREFIX + iccId, null);
    }

    /**