forked from upstream-mirrors/OpenTracks
merge heads
This commit is contained in:
+2
-1
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.google.android.apps.mytracks.services;
|
||||
|
||||
|
||||
/**
|
||||
* A LocationListenerPolicy that will change based on how long the user has been
|
||||
* stationary.
|
||||
@@ -39,7 +40,7 @@ public class AdaptiveLocationListenerPolicy implements LocationListenerPolicy {
|
||||
private final long maxInterval;
|
||||
|
||||
private final int minDistance;
|
||||
|
||||
|
||||
/**
|
||||
* The time the user has been at the current location, in milliseconds.
|
||||
*/
|
||||
|
||||
@@ -20,6 +20,7 @@ import static com.google.android.apps.mytracks.Constants.TAG;
|
||||
|
||||
import com.google.android.apps.mytracks.widgets.TrackWidgetProvider;
|
||||
import com.google.android.maps.mytracks.R;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
|
||||
import android.app.IntentService;
|
||||
import android.content.ComponentName;
|
||||
@@ -94,6 +95,18 @@ public class ControlRecordingService extends IntentService implements ServiceCon
|
||||
@Override
|
||||
protected void onHandleIntent(Intent intent) {
|
||||
waitConnected();
|
||||
onHandleIntent(intent, trackRecordingService);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handles the intent to start or stop a recording.
|
||||
*
|
||||
* @param intent to be handled
|
||||
* @param trackRecordingService the trackRecordingService
|
||||
*/
|
||||
@VisibleForTesting
|
||||
void onHandleIntent(Intent intent, @SuppressWarnings("hiding") ITrackRecordingService trackRecordingService) {
|
||||
String action = intent.getAction();
|
||||
if (action != null) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user