Regarding your ProviderLocked, shouldn't that come after setting ProviderName to gps ?
I don't have an Android 12 either.