Also have killed APIs/Products that are extremely difficult to transition from with short notice. For example, they gave ~4 months for the Google Wallet for the web transition, and no data portability for businesses with users on subscriptions.
Stripe, for example, has a data portability clause that allows you to move card data to another payments processor that meets some compliance standards.
Regardless of if you get 4 months notice or 1 year notice you still have to do the work to migrate and you're still stuck with the sunk cost of investing in/learning a doomed platform.
That's why I wouldn't build a business on Google, because they have a long history of killing things when they aren't wildly profitable/successful. A $10m/yr profit product is considered a distraction of valuable engineer time unless it has some ulterior goal for the company.
And I'm not saying they should change -- they do what's right for them. One engineer working on some distraction project could instead be moved to ads quality and end up making a change worth anywhere from hundreds of millions/yr to billions.