Here's the timeline of the Section 377 case:
2001: Naz Foundation files petition
Naz Foundation, an NGO that work on HIV/AIDS and sexual health issues, files a petition in the Delhi high court against Section 377.
2009: Delhi High Court on Section 377
In 2009, the Delhi High Court described Section 377 as a violation of the fundamental rights guaranteed by the constitution. Religious groups, however, had appealed against the decision in the Supreme Court.
2013: Supreme Court Re-ciminalises Gay Sex
2016: Curative petition by Naz Foundation, activists heard
In February 2016, the three-member bench headed by then the Chief Justice of India TS Thakur said that all the curative plea of NGO Naz Foundation and some gay rights activists will be reviewed afresh by a five-member constitutional bench.
2017: Supreme Court Upholds Right To Privacy
In August 2017, the Supreme Court held Right to Privacy as a fundamental right. Sexual orientation, the court said, is an "essential component of identity" and the rights of lesbian, gay, bisexual and transgender population are "real rights founded on sound constitutional doctrine".