​Diplomatic ties between the longstanding rivals are on an upswing at a time when U.S. tariffs have added to economic uncertainties in the world’s two most populous nations.