I really don't see what the problem is.
- Indian naval ships have docked at Sri Lankan ports
- Pakistani naval ships have docked at Sri Lankan ports
- Japanese naval ships have docked at Sri Lankan ports
- French naval ships have docked at Sri Lankan ports
- Australian naval ships have docked at Sri Lankan ports
So... why can't Chinese submarines dock at Sri Lankan ports when they are passing through?
Meanwhile India:
1) Armed, trained and funded the LTTE and has never expressed regret for this.
2) Voted against Sri Lanka not once but twice at the United Nations (the only Asian nation to do so)
3) Pampers politicians from Tamil Nadu who support separatism in Sri Lanka, and spread anti-Sri Lankan vitriol
4) Does absolutely nothing about the thousands of Tamil Nadu fishermen poaching in Sri Lankan waters on a daily basis, yet cries foul when they are arrested.
5) Refuses to have a complete defence relationship with the island.
6) Refuses to invest in Sri Lanka yet cries foul when China does so.
7) Tries to manipulate Sri Lankan politics to further its own interests.
8) An Indian prime minister has not visited Sri Lanka on an official government visit for.... how long now?
This is called a 'dog in the manger' attitude.
It's up to the Indian government to fix its foreign policy failure in the region.
On the other hand China:
1) Provided arms and training to Sri Lanka to defeat the LTTE
2) Gave full support to Sri Lanka at international fora, including the United Nations by voting against the US sponsored resolution
3) Continues to support Sri Lanka politically, economically and militarily
4) Has a full defence relationship with Sri Lanka and is eager to expand this relationship (held back on the Sri Lankan side by "Indian concerns")
5) Has heavily invested in Sri Lanka in several major projects and continues to seek other areas to invest in.
6) Promotes tourism to the island amongst its people and encourages people to people contact
7) Chinese president Xi Jinping made a personal visit to Sri Lanka this year and re-iterates Chinese support for Sri Lanka.
8) Does not manipulate Sri Lankan politics to suit its ends.
So I wouldn't don't blame China... or Sri Lanka at all.
India needs to learn from China.