-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bump Maps to v10. * Remove developer-config from tracked files. * Remove wrong NonNull annotations from SimpleStandardOnGestureListener. * Update changelog. * Update README and gradle properties with new version. * Update docker. * Fix checkstyle. * Review comments. * Fix lint.
- Loading branch information
Showing
14 changed files
with
106 additions
and
118 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
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
24 changes: 6 additions & 18 deletions
24
app/src/main/java/com/mapbox/android/gestures/testapp/Utils.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 |
---|---|---|
@@ -1,36 +1,24 @@ | ||
package com.mapbox.android.gestures.testapp; | ||
|
||
import android.content.Context; | ||
import androidx.annotation.NonNull; | ||
|
||
import com.mapbox.mapboxsdk.Mapbox; | ||
import androidx.annotation.NonNull; | ||
|
||
public class Utils { | ||
|
||
/** | ||
* <p> | ||
* Returns the Mapbox access token set in the app resources. | ||
* </p> | ||
* It will first search for a token in the Mapbox object. If not found it | ||
* will then attempt to load the access token from the | ||
* {@code res/values/dev.xml} development file. | ||
* It will attempt to load the access token from the | ||
* {@code res/values/developer-config.xml} development file. | ||
* | ||
* @param context The {@link Context} of the {@link android.app.Activity} or {@link android.app.Fragment}. | ||
* @return The Mapbox access token or null if not found. | ||
*/ | ||
public static String getMapboxAccessToken(@NonNull Context context) { | ||
try { | ||
// Read out AndroidManifest | ||
String token = Mapbox.getAccessToken(); | ||
if (token == null || token.isEmpty()) { | ||
throw new IllegalArgumentException(); | ||
} | ||
return token; | ||
} catch (Exception exception) { | ||
// Use fallback on string resource, used for development | ||
int tokenResId = context.getResources() | ||
.getIdentifier("mapbox_access_token", "string", context.getPackageName()); | ||
return tokenResId != 0 ? context.getString(tokenResId) : null; | ||
} | ||
int tokenResId = context.getResources().getIdentifier( | ||
"mapbox_access_token", "string", context.getPackageName()); | ||
return tokenResId != 0 ? context.getString(tokenResId) : null; | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Fri Jan 18 15:22:24 CET 2019 | ||
#Thu Aug 18 15:53:42 EEST 2022 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip | ||
zipStoreBase=GRADLE_USER_HOME |
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
Oops, something went wrong.