What methods does Google use to match IP addresses to approximate location inside a building using wifi or service-provider?
The actual location identification method is abstracted away. Developers are to only concern themselves with the source.
The NETWORK_PROVIDER source uses the IP Address and Cellular triangulation to identify the user's location.
http://developer.android.com/reference/android/location/LocationManager.html#NETWORK_PROVIDER