@Kib +
Nokia underestimated touch, and thought their old way will survive.
I don't think switching to android would have made any difference, beside, except for Samsung everyone else is either a) making loses or b) barely surviving.
The only real way to make money for these OEMs is to have their own in house complete solutions, which means they'll have to fork their own version of android, get rid of as many google services as they can and inject their own (provided they are as good if not better), but that isn't something smaller OEMs can do.
Even Samsung is starting to suffer now, next quarter sales projections doesn't look that good either. So there is no easy answer to this question.
IMO Nokia did the best thing it could do at that moment, they took the OS injected their own services (where they could) and tried to make best of it, unfortunately, Microsoft needed another few years to bring its OS almost on par with competition, rest is history. Although, Microsoft is reaping some benefits of Nokia’s efforts, as windows phone has crossed 10% share many markets, and rising in others.