On my devices doing the first causes apps using the Google Play Services to report that you've disabled the location service completely, while the direct GPS based apps continue just fine.
The broader point here is wanting to be able to remove Google's service software from the equation, and run only code you can actually inspect the contents of for this kind of data. To be honest those apps having direct GPS access isn't ideal either and this should all be proxied through a standardised open source app on the device.
On a Nexus 5 doing the first doesn't change anything for me; it's just less accurate (I did so, then opened up Google Maps to double check).
But you're going to have to define what you mean by "Google code", because ostensibly all of Android is "Google code". Doing what I outlined above will stop it from going through any form of sensor fusion. If you want to remove Google's service software then just create a build without Play Services on it, it's that simple. AOSP boots, on the Nexus devices at least, without it, so it's easy to do and gets you exactly what you want.
So really I guess I'm saying: What else do you want? Remove Play Services, the Google Apps, etc, using an AOSP based build and you get a Google free phone.
The broader point here is wanting to be able to remove Google's service software from the equation, and run only code you can actually inspect the contents of for this kind of data. To be honest those apps having direct GPS access isn't ideal either and this should all be proxied through a standardised open source app on the device.