private PersistableBundle getCarrierConfig() {
    if (!SubscriptionManager.isValidSubscriptionId(mSubId)) {
      Log.w(TAG, "Invalid subscriptionId or subscriptionId not provided in intent.");
      return null;
    }

    CarrierConfigManager carrierConfigManager =
        (CarrierConfigManager) mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE);
    if (carrierConfigManager == null) {
      Log.w(TAG, "No carrier config service found.");
      return null;
    }

    return carrierConfigManager.getConfigForSubId(mSubId);
  }
 private void updateCarrierServices(int slotId, String simState) {
   CarrierConfigManager configManager =
       (CarrierConfigManager) mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE);
   configManager.updateConfigForPhoneId(slotId, simState);
   mCarrierServiceBindHelper.updateForPhoneId(slotId, simState);
 }