This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
1,508 additions
and
503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/ModuleProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.mapbox.mapboxsdk; | ||
|
||
import android.support.annotation.NonNull; | ||
import android.support.annotation.Nullable; | ||
import com.mapbox.mapboxsdk.http.HttpRequest; | ||
import com.mapbox.mapboxsdk.maps.TelemetryDefinition; | ||
|
||
/** | ||
* Injects concrete instances of configurable abstractions | ||
*/ | ||
public interface ModuleProvider { | ||
|
||
/** | ||
* Create a new concrete implementation of HttpRequest. | ||
* | ||
* @return a new instance of an HttpRequest | ||
*/ | ||
@NonNull | ||
HttpRequest createHttpRequest(); | ||
|
||
/** | ||
* Get the concrete implementation of TelemetryDefinition | ||
* | ||
* @return a single instance of Telemetry | ||
*/ | ||
@Nullable | ||
TelemetryDefinition obtainTelemetry(); | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
...orm/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/ModuleProviderImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.mapbox.mapboxsdk; | ||
|
||
import android.support.annotation.NonNull; | ||
import android.support.annotation.Nullable; | ||
import com.mapbox.mapboxsdk.http.HttpRequest; | ||
import com.mapbox.mapboxsdk.maps.TelemetryDefinition; | ||
import com.mapbox.mapboxsdk.module.http.HttpRequestImpl; | ||
import com.mapbox.mapboxsdk.module.telemetry.TelemetryImpl; | ||
|
||
public class ModuleProviderImpl implements ModuleProvider { | ||
|
||
@Override | ||
@NonNull | ||
public HttpRequest createHttpRequest() { | ||
return new HttpRequestImpl(); | ||
} | ||
|
||
@Override | ||
@Nullable | ||
public TelemetryDefinition obtainTelemetry() { | ||
// TODO remove singleton with next major release, | ||
// this is needed to make static methods on TelemetryImpl | ||
// backwards compatible without breaking semver | ||
return TelemetryImpl.getInstance(); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...d/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/TelemetryConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.mapbox.mapboxsdk.constants; | ||
|
||
public class TelemetryConstants { | ||
|
||
public static final String TWO_FINGER_TAP = "TwoFingerTap"; | ||
public static final String DOUBLE_TAP = "DoubleTap"; | ||
public static final String SINGLE_TAP = "SingleTap"; | ||
public static final String PAN = "Pan"; | ||
public static final String PINCH = "Pinch"; | ||
public static final String ROTATION = "Rotation"; | ||
public static final String PITCH = "Pitch"; | ||
|
||
} |
Oops, something went wrong.