[android] #2954 - LocationServices Singleton setup
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package com.mapbox.mapboxsdk.location;
|
||||
|
||||
public class LocationServices {
|
||||
|
||||
private static LocationServices instance = null;
|
||||
|
||||
/**
|
||||
* Private constructor for singleton LocationServices
|
||||
*/
|
||||
private LocationServices() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Primary (singleton) access method for LocationServices
|
||||
* @return LocationServices
|
||||
*/
|
||||
public static LocationServices getLocationServices() {
|
||||
if (instance == null) {
|
||||
instance = new LocationServices();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user