The first 'if' always evaluated to true, as it evaluated values which are the default ones for Android and iOS respectively, so even if one of them was overridden, the other one would be true. Fixes #27658. (cherry picked from commit c2fb1c9f01)
c2fb1c9f01