Verify provider is valid before adding to a flavor

Change-Id: I45e7260d5ad4aad7042a50f684f5b71bfa2e22f4
Merge "Verify provider is valid before adding to a flavor"