blob: 5b02bddf548a8a9e34b1d6025a5e5194c3de83d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
package com.mapswithme.maps.location;
import android.support.annotation.NonNull;
import com.mapswithme.util.log.Logger;
import com.mapswithme.util.log.LoggerFactory;
abstract class BaseLocationProvider
{
static final Logger LOGGER = LoggerFactory.INSTANCE.getLogger(LoggerFactory.Type.LOCATION);
private static final String TAG = BaseLocationProvider.class.getSimpleName();
@NonNull
private final LocationFixChecker mLocationFixChecker;
private boolean mActive;
@NonNull
LocationFixChecker getLocationFixChecker()
{
return mLocationFixChecker;
}
BaseLocationProvider(@NonNull LocationFixChecker locationFixChecker)
{
mLocationFixChecker = locationFixChecker;
}
protected abstract void start();
protected abstract void stop();
/**
* Indicates whether this provider is providing location updates or not
* @return true - if locations are actively coming from this provider, false - otherwise
*/
public final boolean isActive()
{
return mActive;
}
final void setActive(boolean active)
{
LOGGER.d(TAG, "setActive active = " + active);
mActive = active;
}
}
|