LOL....you're citing probably one of the sorriest WW2 movies ever made as a source??!!
Your credibility on this topic just went out the window.
As usual, you misunderstood.
There have been numerous movies & documentaries on both Pearl Harbor & Midway.
Each offers its own explanation for events and failures.
There are so many different ones, you may well have some of them confused.
The most recent Midway movie (2019) is actually both accurate and enjoyable, I found no major faults with it.
But what exactly Layton said to Kimmel or Nimitz, I don't know, nobody knows, and nobody knows exactly what they knew & didn't know on December 6, 1941.
So the significance of the 2019 movie version is that it gives us a pretty fair representation of what today's "conventional wisdom" thinks on the subject -- namely that Layton (or maybe just Rochefort) knew more than they were able to impress on Kimmel.
I've seen no evidence, ever, to suggest they knew the attack was coming from Japanese carriers on Sunday morning, December 7, 1941.