private void doRefreshEarthquakes() { [ ... previous refreshEarthquakes method ... ] }
2. 创建一个新的refreshEarthquakes方法。它需要启动一个执行新命名的doRefreshEarthquakes方法的线程。private void refreshEarthquakes() { Thread updateThread = new Thread(null, backgroundRefresh,“refresh_earthquake”); updateThread.start(); } private Runnable backgroundRefresh = new Runnable() { public void run() { doRefreshEarthquakes(); } };