In its services and repair terms and conditions, Google says it will keep devices sent in for repair if they have a non-OEM part.
Update:
Google changes repair policy after criticism of third-party parts ban Google previously said it would not return mailed-in devices using “unauthorized” parts.
When you live in a sane country. I can’t imagine this applying anywhere in Europe for example.