Comment by aprilnya
On the other hand, there’s been a bug open to make a simple harmless change to fix this in Android for 9 months, with no response from Google other than asking for reproduction steps as far as I can tell.
https://issuetracker.google.com/issues/371713238
Some comments on the bug accuse Google of intentionally not fixing it to make people buy Pixel Buds instead of AirPods.
I wouldn’t say that myself, but then again I also wouldn’t say that Apple intentionally violated the spec just to make AirPods not work on Android.
No one has presented a remotely correct fix anywhere on that issue, or elsewhere to my knowledge.
You're welcome to write an actually correct patch for android if you want, one that isn't just commenting out code and probably breaking some spec-compliant bluetooth devices.
Make sure to test your patch against all the bluetooth devices in existence to make sure it doesn't regress.
Do that, make a PR, wait the average third-party-android-PR review time (approximately 5 years), and then if your PR isn't accepted at that point we can maybe say Google is intentionally ignoring this issue.