Earlier this year, the International Trade Commission (ITC) handed down a ruling in the patent dispute between Sonos and Google. The ITC sided with Sonos, leading Google to make several changes to Nest and Home speakers.
One such change involved removing the ability for people to adjust the volume of a group of Google speakers using the physical volume buttons or rocker on their smartphone. An in-depth analysis of the code behind this change from Esper's Senior Technical Editor Mishaal Rahman showcases how Google made the adjustment and, interestingly, how the impacts will be worse for Pixel users.
The post is well worth the read, but it is also quite technical. I'll do my best to simplify below, but if you want to full details, check out the blog post here.
Changing the logic behind volume adjustments
To start, Google began changing how the volume rocker on your smartphone interacts with its smart home speakers when developing Android 12 -- developers first discovered the change in September with the release of Android 12 Beta 5. Before the change, Android would check whether media playback was local (on-device) or remote (happening on an external device, such as a Cast-enabled speaker). Depending on the result of that check, Android would automatically adjust volume accordingly when users pressed the buttons on their phone.
Android 12 broke that check, effectively disabling the ability to adjust media volume for remote devices. Shortly after the Beta 5 release, a Google developer hinted that the change was related to an unspecified "legal issue." Although it wasn't clarified, that likely referred to the Sonos patent dispute.
According to Rahman, Android 12 release 26 (a.k.a. the January 2022 patch that started hitting Pixel devices this month) introduced new logic to handle local/remote volume control. Devices on this version of Android will check three conditions to decide whether to allow volume adjustments for remote settings:
- Whether the active media session uses local playback.
- If the flag ' config_volumeAdjustmentForRemoteGroupSessions' is set to true.
- If the list of routing sessions for the app contains a single route (apart from the system routing session).
The way it's set up, if the first or second condition is met, then Android doesn't check condition three. If both of those conditions fail, then Android checks condition three. This is where things get really interesting.
Android can still change group speaker volume -- Pixels can't
Rahman found that the Android Open Source Project (AOSP) defines the second condition as true. (AOSP, for those not familiar, is the open-source foundation of the mobile OS -- most Android smartphones use AOSP plus an assortment of other software like Google Play Services and changes from manufacturers to deliver the user experience you're used to.) That means Android allows users to adjust the volume of remote media session on a group of speakers by default.
However, Pixel phones with the latest Android update still don't let users adjust the volume of speaker groups using the physical volume keys. Rahman discovered that on Pixel phones, that second condition is set to false, effectively blocking volume control for remote sessions on groups of speakers. Plus, that means other Android phone makers could allow group speaker management if they want to:
"While the first patch appears to have been more of a “band aid,” the second patch seems tailored to allow Google to ship Pixel phones without the ability to control the volume of remote speaker group sessions. But it also leaves an easy way for OEMs to ship their own devices with the feature enabled."
Finally, Rahman notes that the new volume behaviour is also present in the Android 12L beta. He outlines a way for users to override that setting, manually enabling group speaker volume control on Pixel phones, but it's a technical process that requires superuser access.
Despite the complexity of the code, it seems like a simple way for Google to side-step legal ramifications by disabling group speaker volume control for Pixel phones while simultaneously keeping the feature available for Android manufacturers. That said, it sucks for Pixel users who, for now, won't be able to change the volume on groups of speakers using their smartphone's volume rocker.