According to relevant reports, the US PTO recently published a new patent from Apple (filed in 2012) that describes how to use sensors to compensate for ambient lighting and lifetime brightness degradation in OLED displays. The patent describes that photo-diodes can be placed inside the OLED array or above and below it.
Apple didn't use an OLED display in any of their products yet, but the company has been trying to improve the OLED technology, for example, the OLED color changes due to the long service time. This new patent includes many advanced technologies to test and compensate lighting fluctuation.
Putting photo-diodes inside the display will enable them to more accurately measure light levels. So if a part of the screen is dimmer than the rest of the screen (for example because only a part of the display is under direct light) - the photodiode will detect it and then the display brightness in that area can be increased. This is something that cannot be achieved with a single sensor. Those photodiodes can also be used to learn whether certain OLED pixels (or pixel groups) have lowered brightness due to aging. Then the display can compensate and drive these pixels higher.
The Fraunhofer Institute has been putting photodiodes between OLED pixels since 2009. They call these bi-directional displays and use them in their interactive data eyeglasses (the photodiodes are used to track eye movement). Apple's design is more simple and limited of course.
Compensating for lifetime issues in pixels is also not a new idea. Ignis has been touting their MaxLife technology for a while now. Ignis' external compensation technology keeps track of how much each pixel was used, and calculates the brightness loss in that particular pixel. This information is used to drive this pixel accordingly to compensate. Ignis' technology is incorporated into the backplane and does not use photo-diodes to sense levels. So it's probably more accurate than what's possible with Apple's design, but it may be more difficult to make.