Former Los Angeles Lakers head coach Luke Walton learned that Magic Johnson was resigning as president of basketball operations via text while preparing for the Portland Trail Blazers game with his staff, according to Dave McMenamin and Ohm Youngmisuk of ESPN.

Johnson stepped down from his position on Wednesday during an impromptu press conference at Staples Center. It was a move which shocked many people, including the reporters who were speaking with Magic.

Walton learned that Johnson was resigning via text while preparing for the Trail Blazers game with his staff, sources said.

“Tomorrow, I would have to affect someone's livelihood and life,” Johnson said of his plans to dismiss Walton as soon as the season ended. “I thought about that and said, ‘That's not fun for me. That's not who I am.' Then I don't want to put her in the middle of us. Even though, she said, ‘Hey, you do what you want to do.' I know she has great love for him and great love for me.”

Magic said he was happier when he wasn't working with the Lakers. The Hall of Famer also reportedly didn't work that hard at his job.

The Lakers went 37-45 this season. They haven't made the playoffs since 2013.