willAnimateRotationToInterfaceOrientation - this deprecated API is getting called when app enters background and "toOrientation" is incorrect.
If I put the app in background when the device is in portrait, willAnimateRotationToInterfaceOrientation is getting called and
toInterfaceOrientation is set to LandscapeLeft.