Robert Pattinson probably had good reason to keep his earbuds close at LAX ... he was on the same flight as his ex.

Robert arrived Friday after flying with Kristen Stewart and her girlfriend Stella Maxwell from France to the City of Angels. You may recall, Robert's relationship with Kristen was rocky ... especially after she allegedly cheated on him with director Rupert Sanders.

Time heals all, or so they say. Nevertheless, Robert left LAX without Kristen being anywhere in sight.