Google said that smartphone accelerometers are sensitive enough to detect P-waves, which are the first waves to arrive during an earthquake. So if your Android phone thinks it has detected an earthquake, it will communicate with a central server to confirm.
In California, Google is also partnering with the United States Geological Survey and California Governor’s Office of Emergency Services to provide earthquake alerts. For everyone else, you’ll only see this earthquake data if you search for “earthquake” or a similar term.