Samsung publicly says it didn't actually stage the stunt, even though it was a major advertiser during the telecast (to the tune of $20 million). Yes, the company provided the Galaxy phones and showed Ms. DeGeneres how to use them. Then the company stepped back and let the improv flow, touching off a viral firestorm that added to the product's high profile. Not exactly product placement, not exactly advertising, but definitely smart marketing.
Apparently the star also used an iPhone to tweet during the show. Still, Samsung was so happy with the results of the selfie seen round the world that it later donated $3 million to charities of Ms. DeGeneres's choice.