The 31-year-old’s days in Bavaria looked numbered at the end of last season when he was told by club president Uli Hoeness to look for a new club after losing his starting spot under previous manager Niko Kovac.
Boateng was linked with a move to Arsenal in the January transfer window but a move could not materialize.
Boateng has regained his place under Hansi Flick since the turn of the year, and has made 18 Bundesliga appearances, missing just one league game in 2020 which was due to suspension.
“Before Hansi Flick, I was already thinking about my future,” Boateng admitted to Welt am Sonntag.
“At the moment I feel good and can imagine that I will stay. My focus is totally on Bayern and the current season.
“I need the trust of the coach and his coaching team. I have it again. Even before the time with Hansi Flick, I trained well and hard, but I was not allowed to play and never had the chance to get into my rhythm. It is difficult for every player.
“Hansi Flick told me right from the start that he was planning with me and appreciated my qualities. Now I’m really enjoying football again.”
Boateng was in action for 73 minutes on Saturday as Bayern thrashed Eintracht Frankfurt 5-2 to restore their four-point lead over Borussia Dortmund in the race for the Bundesliga title.