mActivityRecognitionClient.requestActivityUpdates( DETECTION_INTERVAL_MILLISECONDS, mActivityRecognitionPendingIntent); break; case STOP: mActivityRecognitionClient.removeActivityUpdates( mActivityRecognitionPendingIntent); break; default: break; } /* * Since the preceding call is synchronous, turn off the * in progress flag and disconnect the client */ mInProgress = false; mActivityRecognitionClient.disconnect(); } /* * Called by Location Services once the activity recognition * client is disconnected.