Automatic Camera Switching

“When the device opens or closes and the camera automatically changes, how does the systems decide which camera provides the best experience”???