[android] - remove wear module from project
This commit is contained in:
committed by
Tobrun
parent
48481db47b
commit
39face8e10
13
Makefile
13
Makefile
@@ -580,13 +580,6 @@ run-android-unit-test: platform/android/configuration.gradle
|
||||
run-android-unit-test-%: platform/android/configuration.gradle
|
||||
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDKTestApp:testDebugUnitTest --tests "$*"
|
||||
|
||||
# Run Java Unit tests on the JVM of the machine executing this
|
||||
.PHONY: run-android-wear-unit-test
|
||||
run-android-wear-unit-test: platform/android/configuration.gradle
|
||||
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDKWearTestApp:testDebugUnitTest
|
||||
run-android-wear-unit-test-%: platform/android/configuration.gradle
|
||||
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDKWearTestApp:testDebugUnitTest --tests "$*"
|
||||
|
||||
# Run Instrumentation tests on AWS device farm, requires additional authentication through gradle.properties
|
||||
.PHONY: run-android-ui-test-aws
|
||||
run-android-ui-test-aws: platform/android/configuration.gradle
|
||||
@@ -632,11 +625,6 @@ android-lint-sdk: platform/android/configuration.gradle
|
||||
android-lint-test-app: platform/android/configuration.gradle
|
||||
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDKTestApp:lint
|
||||
|
||||
# Runs lint on the Android wear test app code
|
||||
.PHONY: android-lint-wear-app
|
||||
android-lint-wear-app: platform/android/configuration.gradle
|
||||
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDKWearTestApp:lint
|
||||
|
||||
# Generates javadoc from the Android SDK
|
||||
.PHONY: android-javadoc
|
||||
android-javadoc: platform/android/configuration.gradle
|
||||
@@ -672,7 +660,6 @@ clean:
|
||||
./platform/android/MapboxGLAndroidSDK/build \
|
||||
./platform/android/MapboxGLAndroidSDK/.externalNativeBuild \
|
||||
./platform/android/MapboxGLAndroidSDKTestApp/build \
|
||||
./platform/android/MapboxGLAndroidSDKWearTestApp/build \
|
||||
./platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/activity/gen \
|
||||
./platform/android/MapboxGLAndroidSDK/src/main/assets
|
||||
|
||||
|
||||
13
circle.yml
13
circle.yml
@@ -167,9 +167,6 @@ jobs:
|
||||
- run:
|
||||
name: Test phone module
|
||||
command: make run-android-unit-test
|
||||
- run:
|
||||
name: Test wear module
|
||||
command: make run-android-wear-unit-test
|
||||
- run:
|
||||
name: Generate Espresso sanity tests
|
||||
command: make test-code-android
|
||||
@@ -184,10 +181,6 @@ jobs:
|
||||
name: Check Android modules for potential bugs (Lint Test App)
|
||||
command: |
|
||||
make android-lint-test-app
|
||||
- run:
|
||||
name: Check Android modules for potential bugs (Lint Wear Test App)
|
||||
command: |
|
||||
make android-lint-wear-app
|
||||
- run:
|
||||
name: Build Test APK
|
||||
command: |
|
||||
@@ -238,12 +231,6 @@ jobs:
|
||||
path: platform/android/MapboxGLAndroidSDKTestApp/build/reports/lint-results.xml
|
||||
- store_artifacts:
|
||||
path: platform/android/MapboxGLAndroidSDKTestApp/lint-baseline.xml
|
||||
- store_artifacts:
|
||||
path: platform/android/MapboxGLAndroidSDKWearTestApp/build/reports/lint-results.html
|
||||
- store_artifacts:
|
||||
path: platform/android/MapboxGLAndroidSDKWearTestApp/build/reports/lint-results.xml
|
||||
- store_artifacts:
|
||||
path: platform/android/MapboxGLAndroidSDKWearTestApp/lint-baseline.xml
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
android-release-all:
|
||||
|
||||
1
platform/android/.gitignore
vendored
1
platform/android/.gitignore
vendored
@@ -20,7 +20,6 @@ local.properties
|
||||
|
||||
# Token file
|
||||
MapboxGLAndroidSDKTestApp/src/main/res/values/developer-config.xml
|
||||
MapboxGLAndroidSDKWearTestApp/src/main/res/values/developer-config.xml
|
||||
|
||||
# Twitter Fabric / Crashlytics
|
||||
fabric.properties
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
lint-baseline.xml
|
||||
lint/lint-baseline-local.xml
|
||||
@@ -1,52 +0,0 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.mapbox.mapboxsdk.testapp"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode rootProject.ext.versionCode
|
||||
versionName rootProject.ext.versionName
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
baseline file("lint-baseline.xml")
|
||||
disable 'MissingTranslation'
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
testCoverageEnabled = true
|
||||
}
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(project(':MapboxGLAndroidSDK')) {
|
||||
transitive = true
|
||||
}
|
||||
|
||||
// Wear
|
||||
compile rootProject.ext.dep.wearCompile
|
||||
provided rootProject.ext.dep.wearProvided
|
||||
|
||||
// Leak Canary
|
||||
debugCompile rootProject.ext.dep.leakCanaryDebug
|
||||
releaseCompile rootProject.ext.dep.leakCanaryRelease
|
||||
testCompile rootProject.ext.dep.leakCanaryTest
|
||||
|
||||
// Testing dependencies
|
||||
testCompile rootProject.ext.dep.junit
|
||||
testCompile rootProject.ext.dep.mockito
|
||||
}
|
||||
|
||||
apply from: 'gradle-config.gradle'
|
||||
apply from: 'gradle-checkstyle.gradle'
|
||||
apply from: '../gradle-lint.gradle'
|
||||
@@ -1,17 +0,0 @@
|
||||
apply plugin: 'checkstyle'
|
||||
|
||||
checkstyle {
|
||||
toolVersion = "7.1.1" // 7.3
|
||||
configFile = "../checkstyle.xml" as File
|
||||
}
|
||||
|
||||
task checkstyle(type: Checkstyle) {
|
||||
description 'Checks if the code adheres to coding standards'
|
||||
group 'verification'
|
||||
configFile file("../checkstyle.xml")
|
||||
source 'src'
|
||||
include '**/*.java'
|
||||
exclude '**/gen/**'
|
||||
classpath = files()
|
||||
ignoreFailures = false
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// Configuration file for gradle build execution.
|
||||
//
|
||||
|
||||
task accessToken {
|
||||
def tokenFile = new File("${projectDir}/src/main/res/values/developer-config.xml")
|
||||
if (!tokenFile.exists()) {
|
||||
String tokenFileContents = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
|
||||
"<resources>\n" +
|
||||
" <string name=\"mapbox_access_token\">" + "$System.env.MAPBOX_ACCESS_TOKEN" + "</string>\n" +
|
||||
"</resources>"
|
||||
|
||||
if (tokenFileContents == null) {
|
||||
throw new InvalidUserDataException("You must set the MAPBOX_ACCESS_TOKEN environment variable.")
|
||||
}
|
||||
tokenFile.write(tokenFileContents)
|
||||
}
|
||||
}
|
||||
|
||||
gradle.projectsEvaluated {
|
||||
preBuild.dependsOn('accessToken')
|
||||
}
|
||||
@@ -1,823 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- REMEMBER! First you run Lint locally you'll need to move the lint-baseline.xml file
|
||||
generated into the lint folder and called it lint-baseline-local.xml
|
||||
If you remove any error when running Lint locally, you'll get a warning from the command
|
||||
line advising you to remove it from the baseline. If you remove it (remember to remove it
|
||||
from lint-baseline-local.xml file) you should remove it too from
|
||||
lint-baseline-ci.xml (THIS FILE) which is the only one included in the repo.
|
||||
Eventually, it'll be removed (when we remove all current lint errors included). -->
|
||||
<issues format="4" by="lint 2.3.1">
|
||||
|
||||
<issue
|
||||
id="MissingPermission"
|
||||
message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
|
||||
errorLine1=" Location lastKnownLocation = locationEngine.getLastLocation();"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java"
|
||||
line="783"
|
||||
column="38"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingPermission"
|
||||
message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
|
||||
errorLine1=" locationEngine.requestLocationUpdates();"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java"
|
||||
line="787"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="GradleCompatible"
|
||||
message="All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.3.1, 23.0.1. Examples include `com.android.support:animated-vector-drawable:25.3.1` and `com.android.support:percent:23.0.1`">
|
||||
<location
|
||||
file="build.gradle"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="DefaultLocale"
|
||||
message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead"
|
||||
errorLine1=" Timber.v(String.format("[HTTP] Request was successful (code = %d).", response.code()));"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="112"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="DefaultLocale"
|
||||
message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead"
|
||||
errorLine1=" Timber.d(String.format("
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="116"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="TimberArgCount"
|
||||
message="Wrong argument count, format string `Failed to read the package metadata: ` requires `0` but format call supplies `1`"
|
||||
errorLine1=" Timber.e("Failed to read the package metadata: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="75"
|
||||
column="7"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="TimberArgCount"
|
||||
message="Wrong argument count, format string `Failed to read the storage key: ` requires `0` but format call supplies `1`"
|
||||
errorLine1=" Timber.e("Failed to read the storage key: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="77"
|
||||
column="7"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="TimberArgCount"
|
||||
message="Wrong argument count, format string `Failed to obtain the external storage path: ` requires `0` but format call supplies `1`"
|
||||
errorLine1=" Timber.e("Failed to obtain the external storage path: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="86"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="TimberArgCount"
|
||||
message="Wrong argument count, format string `Failed to delete old ambient cache database: ` requires `0` but format call supplies `1`"
|
||||
errorLine1=" Timber.e("Failed to delete old ambient cache database: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
|
||||
line="113"
|
||||
column="11"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.v("Connected: " + connected);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java"
|
||||
line="85"
|
||||
column="14"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.e("Device returned an out of range width size, ""
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java"
|
||||
line="178"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.e("Device returned an out of range height size, ""
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java"
|
||||
line="185"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.d("Old ambient cache database deleted to save space: " + path);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
|
||||
line="110"
|
||||
column="22"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.e("Not setting minZoomPreference, value is in unsupported range: " + minZoom);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/Transform.java"
|
||||
line="349"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.e("Not setting maxZoomPreference, value is in unsupported range: " + maxZoom);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/Transform.java"
|
||||
line="361"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.e(String.format("Stops: %s is a different type: %s", stops.getClass(), exception));"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java"
|
||||
line="282"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.v(String.format("[HTTP] Request was successful (code = %d).", response.code()));"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="112"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.d(String.format("
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="116"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.d(String.format(MapboxConstants.MAPBOX_LOCALE,"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="163"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.i(String.format(MapboxConstants.MAPBOX_LOCALE,"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="166"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.w(String.format(MapboxConstants.MAPBOX_LOCALE,"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="170"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.e(String.format("Layer: %s is a different type: %s", layerId, exception));"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java"
|
||||
line="286"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.e(String.format("Source: %s is a different type: %s", sourceId, exception));"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java"
|
||||
line="407"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.e(String.format(MapboxConstants.MAPBOX_LOCALE,"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java"
|
||||
line="92"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ThrowableNotAtBeginning"
|
||||
message="Throwable should be first argument"
|
||||
errorLine1=" Timber.e("Failed to read the package metadata: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="75"
|
||||
column="7"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ThrowableNotAtBeginning"
|
||||
message="Throwable should be first argument"
|
||||
errorLine1=" Timber.e("Failed to read the storage key: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="77"
|
||||
column="7"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ThrowableNotAtBeginning"
|
||||
message="Throwable should be first argument"
|
||||
errorLine1=" Timber.e("Failed to obtain the external storage path: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="86"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ThrowableNotAtBeginning"
|
||||
message="Throwable should be first argument"
|
||||
errorLine1=" Timber.e("Failed to delete old ambient cache database: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
|
||||
line="113"
|
||||
column="11"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="AllowBackup"
|
||||
message="On SDK version 23 and up, your app data will be automatically backed up and restored on app install. Consider adding the attribute `android:fullBackupContent` to specify an `@xml` resource which configures which files to backup. More info: https://developer.android.com/training/backup/autosyncapi.html"
|
||||
errorLine1=" <application"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/AndroidManifest.xml"
|
||||
line="14"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StaticFieldLeak"
|
||||
message="Do not place Android context classes in static fields (static reference to `ConnectivityReceiver` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
|
||||
errorLine1=" private static ConnectivityReceiver INSTANCE;"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java"
|
||||
line="24"
|
||||
column="3"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StaticFieldLeak"
|
||||
message="Do not place Android context classes in static fields (static reference to `IconFactory` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
|
||||
errorLine1=" private static IconFactory instance;"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java"
|
||||
line="38"
|
||||
column="3"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StaticFieldLeak"
|
||||
message="Do not place Android context classes in static fields (static reference to `Mapbox` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
|
||||
errorLine1=" private static Mapbox INSTANCE;"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/Mapbox.java"
|
||||
line="29"
|
||||
column="3"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StaticFieldLeak"
|
||||
message="Do not place Android context classes in static fields (static reference to `OfflineManager` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
|
||||
errorLine1=" // This object is implemented as a singleton"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
|
||||
line="42"
|
||||
column="3"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MergeRootFrame"
|
||||
message="This `<FrameLayout>` can be replaced with a `<merge>` tag"
|
||||
errorLine1="<FrameLayout"
|
||||
errorLine2="^">
|
||||
<location
|
||||
file="src/main/res/layout/activity_simple_mapview.xml"
|
||||
line="2"
|
||||
column="1"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.colorPrimary` appears to be unused"
|
||||
errorLine1=" <color name="colorPrimary">@color/mapboxBlue</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="5"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.colorPrimaryDark` appears to be unused"
|
||||
errorLine1=" <color name="colorPrimaryDark">@color/mapboxBlueDark</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="6"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapbox_my_location_ring` appears to be unused"
|
||||
errorLine1=" <color name="mapbox_my_location_ring">@color/mapbox_blue</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml"
|
||||
line="6"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.colorAccent` appears to be unused"
|
||||
errorLine1=" <color name="colorAccent">@color/mapboxRed</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="7"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.materialGrey` appears to be unused"
|
||||
errorLine1=" <color name="materialGrey">#F5F5F5</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="9"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.materialDarkGrey` appears to be unused"
|
||||
errorLine1=" <color name="materialDarkGrey">#DFDFDF</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="10"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxCyan` appears to be unused"
|
||||
errorLine1=" <color name="mapboxCyan">#3BB2D0</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="13"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxGreen` appears to be unused"
|
||||
errorLine1=" <color name="mapboxGreen">#56B881</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="14"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxBlue` appears to be unused"
|
||||
errorLine1=" <color name="mapboxBlue">#3887BE</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="15"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxBlueDark` appears to be unused"
|
||||
errorLine1=" <color name="mapboxBlueDark">#1F6EA5</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="16"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxPurple` appears to be unused"
|
||||
errorLine1=" <color name="mapboxPurple">#8A8ACB</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="17"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxPurpleDark` appears to be unused"
|
||||
errorLine1=" <color name="mapboxPurpleDark">#7171b2</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="18"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxPurpleLight` appears to be unused"
|
||||
errorLine1=" <color name="mapboxPurpleLight">#A4A4E5</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="19"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxDenim` appears to be unused"
|
||||
errorLine1=" <color name="mapboxDenim">#50667F</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="21"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxTeal` appears to be unused"
|
||||
errorLine1=" <color name="mapboxTeal">#41AFA5</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="22"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxOrange` appears to be unused"
|
||||
errorLine1=" <color name="mapboxOrange">#F9886C</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="23"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxRed` appears to be unused"
|
||||
errorLine1=" <color name="mapboxRed">#E55E5E</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="24"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxPink` appears to be unused"
|
||||
errorLine1=" <color name="mapboxPink">#ED6498</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="25"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxYellow` appears to be unused"
|
||||
errorLine1=" <color name="mapboxYellow">#f1f075</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="26"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxMustard` appears to be unused"
|
||||
errorLine1=" <color name="mapboxMustard">#FBB03B</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="27"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxNavy` appears to be unused"
|
||||
errorLine1=" <color name="mapboxNavy">#28353D</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="28"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxNavyDark` appears to be unused"
|
||||
errorLine1=" <color name="mapboxNavyDark">#222B30</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="29"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_infowindow_offset` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_infowindow_offset">-2dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="5"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_infowindow_line_width` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_infowindow_line_width">1.5dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="6"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_attribution_icon_left_padding` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_attribution_icon_left_padding">@dimen/mapbox_two_dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="7"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_attribution_icon_top_padding` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_attribution_icon_top_padding">@dimen/mapbox_two_dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="8"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_attribution_icon_right_padding` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_attribution_icon_right_padding">@dimen/mapbox_two_dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="9"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_attribution_icon_bottom_padding` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_attribution_icon_bottom_padding">@dimen/mapbox_two_dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="10"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_two_dp` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_two_dp">2dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="11"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_ten_dp` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_ten_dp">10dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="14"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_sixteen_dp` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_sixteen_dp">16dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="15"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.drawable.mapbox_infowindow_icon_bg` appears to be unused">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_infowindow_icon_bg.9.png"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapbox_material_bg_selector` appears to be unused"
|
||||
errorLine1="<selector xmlns:android="http://schemas.android.com/apk/res/android">"
|
||||
errorLine2="^">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/color/mapbox_material_bg_selector.xml"
|
||||
line="2"
|
||||
column="1"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.string.mapbox_style_outdoors` appears to be unused"
|
||||
errorLine1=" <string name="mapbox_style_outdoors" translatable="false">mapbox://styles/mapbox/outdoors-v10</string>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml"
|
||||
line="22"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.string.mapbox_style_traffic_day` appears to be unused"
|
||||
errorLine1=" <string name="mapbox_style_traffic_day" translatable="false">mapbox://styles/mapbox/traffic-day-v2</string>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml"
|
||||
line="27"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.string.mapbox_style_traffic_night` appears to be unused"
|
||||
errorLine1=" <string name="mapbox_style_traffic_night" translatable="false">mapbox://styles/mapbox/traffic-night-v2</string>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml"
|
||||
line="28"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="IconDensities"
|
||||
message="Missing the following drawables in `drawable-hdpi`: mapbox_infowindow_icon_bg.9.png, mapbox_mapview_preview.jpg">
|
||||
<location
|
||||
file="src/main/res/drawable-hdpi"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="IconDensities"
|
||||
message="Missing the following drawables in `drawable-mdpi`: mapbox_infowindow_icon_bg.9.png, mapbox_mapview_preview.jpg">
|
||||
<location
|
||||
file="src/main/res/drawable-mdpi"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="IconDensities"
|
||||
message="Missing the following drawables in `drawable-xhdpi`: mapbox_infowindow_icon_bg.9.png, mapbox_mapview_preview.jpg">
|
||||
<location
|
||||
file="src/main/res/drawable-xhdpi"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="IconDensities"
|
||||
message="Missing the following drawables in `drawable-xxhdpi`: mapbox_infowindow_icon_bg.9.png (found in drawable-xxxhdpi)">
|
||||
<location
|
||||
file="src/main/res/drawable-xxhdpi"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="GoogleAppIndexingWarning"
|
||||
message="App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter. See issue explanation for more details."
|
||||
errorLine1=" <application"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/AndroidManifest.xml"
|
||||
line="14"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ContentDescription"
|
||||
message="[Accessibility] Missing `contentDescription` attribute on image"
|
||||
errorLine1="<ImageView xmlns:android="http://schemas.android.com/apk/res/android""
|
||||
errorLine2="^">
|
||||
<location
|
||||
file="src/main/res/layout/mapbox_view_image_marker.xml"
|
||||
line="2"
|
||||
column="1"/>
|
||||
</issue>
|
||||
|
||||
</issues>
|
||||
@@ -1,17 +0,0 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in /Users/cameron/Library/Android/sdk/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the proguardFiles
|
||||
# directive in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
@@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mapbox.weartestapp">
|
||||
|
||||
<uses-feature android:name="android.hardware.type.watch"/>
|
||||
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
||||
<application
|
||||
android:name=".MapboxApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@android:style/Theme.DeviceDefault">
|
||||
<uses-library
|
||||
android:name="com.google.android.wearable"
|
||||
android:required="false"/>
|
||||
|
||||
<activity
|
||||
android:name="com.mapbox.weartestapp.activity.FeatureOverviewActivity"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".activity.SimpleWearMapActivity"
|
||||
android:label="@string/activity_simple_mapview_title">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".activity.FeatureOverviewActivity"/>
|
||||
</activity>
|
||||
|
||||
<service android:name="com.mapbox.services.android.telemetry.service.TelemetryService"/>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.mapbox.weartestapp;
|
||||
|
||||
import android.app.Application;
|
||||
import android.os.StrictMode;
|
||||
|
||||
import com.mapbox.mapboxsdk.Mapbox;
|
||||
import com.squareup.leakcanary.LeakCanary;
|
||||
|
||||
public class MapboxApplication extends Application {
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
Mapbox.getInstance(getApplicationContext(), getString(R.string.mapbox_access_token));
|
||||
LeakCanary.install(this);
|
||||
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
|
||||
.detectDiskReads()
|
||||
.detectDiskWrites()
|
||||
.detectNetwork() // or .detectAll() for all detectable problems
|
||||
.penaltyLog()
|
||||
.build());
|
||||
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
|
||||
.detectLeakedSqlLiteObjects()
|
||||
.penaltyLog()
|
||||
.penaltyDeath()
|
||||
.build());
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.mapbox.weartestapp.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.wearable.activity.WearableActivity;
|
||||
import android.support.wearable.view.WearableRecyclerView;
|
||||
|
||||
import com.mapbox.weartestapp.R;
|
||||
import com.mapbox.weartestapp.adapter.FeatureAdapter;
|
||||
import com.mapbox.weartestapp.model.Feature;
|
||||
import com.mapbox.weartestapp.utils.OffsettingHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class FeatureOverviewActivity extends WearableActivity implements FeatureAdapter.ItemSelectedListener {
|
||||
|
||||
private WearableRecyclerView wearableRecyclerView;
|
||||
private List<Feature> exampleItemModels;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_feature_overview);
|
||||
|
||||
wearableRecyclerView = (WearableRecyclerView) findViewById(R.id.recycler_launcher_view);
|
||||
wearableRecyclerView.setHasFixedSize(true);
|
||||
|
||||
OffsettingHelper offsettingHelper = new OffsettingHelper();
|
||||
|
||||
wearableRecyclerView.setOffsettingHelper(offsettingHelper);
|
||||
|
||||
exampleItemModels = new ArrayList<>();
|
||||
exampleItemModels.add(new Feature(R.string.activity_simple_mapview_title, new Intent(FeatureOverviewActivity.this,
|
||||
SimpleWearMapActivity.class)));
|
||||
|
||||
FeatureAdapter exampleAdapter = new FeatureAdapter(FeatureOverviewActivity.this, exampleItemModels);
|
||||
wearableRecyclerView.setAdapter(exampleAdapter);
|
||||
|
||||
exampleAdapter.setListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemSelected(int position) {
|
||||
startActivity(exampleItemModels.get(position).getActivity());
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package com.mapbox.weartestapp.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.wearable.activity.WearableActivity;
|
||||
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
|
||||
import com.mapbox.weartestapp.R;
|
||||
|
||||
public class SimpleWearMapActivity extends WearableActivity {
|
||||
|
||||
private MapView mapView;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_simple_mapview);
|
||||
|
||||
mapView = (MapView) findViewById(R.id.mapView);
|
||||
mapView.onCreate(savedInstanceState);
|
||||
mapView.getMapAsync(new OnMapReadyCallback() {
|
||||
@Override
|
||||
public void onMapReady(MapboxMap mapboxMap) {
|
||||
|
||||
// Customize map with markers, polylines, etc.
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
mapView.onStart();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
mapView.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
mapView.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
mapView.onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLowMemory() {
|
||||
super.onLowMemory();
|
||||
mapView.onLowMemory();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
mapView.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
mapView.onSaveInstanceState(outState);
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
package com.mapbox.weartestapp.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.wearable.view.WearableRecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mapbox.weartestapp.R;
|
||||
import com.mapbox.weartestapp.model.Feature;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class FeatureAdapter extends WearableRecyclerView.Adapter<FeatureAdapter.ViewHolder> {
|
||||
|
||||
private List<Feature> data;
|
||||
private Context context;
|
||||
private ItemSelectedListener itemSelectedListener;
|
||||
|
||||
public FeatureAdapter(Context context, List<Feature> data) {
|
||||
this.context = context;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
private TextView textView;
|
||||
|
||||
ViewHolder(View view) {
|
||||
super(view);
|
||||
textView = (TextView) view.findViewById(R.id.text_item);
|
||||
}
|
||||
|
||||
void bind(final int position, final ItemSelectedListener listener) {
|
||||
|
||||
itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (listener != null) {
|
||||
listener.onItemSelected(position);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void setListener(ItemSelectedListener itemSelectedListener) {
|
||||
this.itemSelectedListener = itemSelectedListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FeatureAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
return new ViewHolder(LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.item_curved_layout, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(FeatureAdapter.ViewHolder holder, final int position) {
|
||||
if (data != null && !data.isEmpty()) {
|
||||
holder.textView.setText(data.get(position).getTitle());
|
||||
holder.bind(position, itemSelectedListener);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
if (data != null && !data.isEmpty()) {
|
||||
return data.size();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public interface ItemSelectedListener {
|
||||
void onItemSelected(int position);
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package com.mapbox.weartestapp.model;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
public class Feature {
|
||||
|
||||
public int title;
|
||||
public Intent activity;
|
||||
|
||||
public int getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(int title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public Intent getActivity() {
|
||||
return activity;
|
||||
}
|
||||
|
||||
public void setActivity(Intent activity) {
|
||||
this.activity = activity;
|
||||
}
|
||||
|
||||
public Feature(int title, Intent activity) {
|
||||
this.title = title;
|
||||
this.activity = activity;
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package com.mapbox.weartestapp.utils;
|
||||
|
||||
import android.support.wearable.view.DefaultOffsettingHelper;
|
||||
import android.support.wearable.view.WearableRecyclerView;
|
||||
import android.view.View;
|
||||
|
||||
public class OffsettingHelper extends DefaultOffsettingHelper {
|
||||
|
||||
/**
|
||||
* How much should we scale the icon at most.
|
||||
*/
|
||||
private static final float MAX_ICON_PROGRESS = 0.65f;
|
||||
|
||||
private float progressToCenter;
|
||||
|
||||
public OffsettingHelper() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateChild(View child, WearableRecyclerView parent) {
|
||||
super.updateChild(child, parent);
|
||||
|
||||
// Figure out % progress from top to bottom
|
||||
float centerOffset = ((float) child.getHeight() / 2.0f) / (float) parent.getHeight();
|
||||
float yRelativeToCenterOffset = (child.getY() / parent.getHeight()) + centerOffset;
|
||||
|
||||
// Normalize for center
|
||||
progressToCenter = Math.abs(0.5f - yRelativeToCenterOffset);
|
||||
// Adjust to the maximum scale
|
||||
progressToCenter = Math.min(progressToCenter, MAX_ICON_PROGRESS);
|
||||
|
||||
child.setScaleX(1 - progressToCenter);
|
||||
child.setScaleY(1 - progressToCenter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustAnchorOffsetXY(View child, float[] anchorOffsetXY) {
|
||||
anchorOffsetXY[0] = child.getHeight() / 2.0f;
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.wearable.view.BoxInsetLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.FeatureOverviewActivity"
|
||||
tools:deviceIds="wear">
|
||||
|
||||
<android.support.wearable.view.WearableRecyclerView
|
||||
android:id="@+id/recycler_launcher_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical" />
|
||||
|
||||
</android.support.wearable.view.BoxInsetLayout>
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.SimpleWearMapActivity"
|
||||
tools:deviceIds="wear">
|
||||
|
||||
<com.mapbox.mapboxsdk.maps.MapView
|
||||
android:id="@+id/mapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
mapbox:mapbox_cameraTargetLat="40.73581"
|
||||
mapbox:mapbox_cameraTargetLng="-73.99155"
|
||||
mapbox:mapbox_styleUrl="mapbox://styles/mapbox/streets-v10"
|
||||
mapbox:mapbox_cameraZoom="11"
|
||||
mapbox:mapbox_uiZoomControls="false"/>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:clickable="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_item"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="@color/mapboxWhite"
|
||||
android:textSize="14sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 57 KiB |
@@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- Mapbox colors -->
|
||||
<color name="colorPrimary">@color/mapboxBlue</color>
|
||||
<color name="colorPrimaryDark">@color/mapboxBlueDark</color>
|
||||
<color name="colorAccent">@color/mapboxRed</color>
|
||||
|
||||
<color name="materialGrey">#F5F5F5</color>
|
||||
<color name="materialDarkGrey">#DFDFDF</color>
|
||||
|
||||
<color name="mapboxWhite">#ffffff</color>
|
||||
<color name="mapboxCyan">#3BB2D0</color>
|
||||
<color name="mapboxGreen">#56B881</color>
|
||||
<color name="mapboxBlue">#3887BE</color>
|
||||
<color name="mapboxBlueDark">#1F6EA5</color>
|
||||
<color name="mapboxPurple">#8A8ACB</color>
|
||||
<color name="mapboxPurpleDark">#7171b2</color>
|
||||
<color name="mapboxPurpleLight">#A4A4E5</color>
|
||||
|
||||
<color name="mapboxDenim">#50667F</color>
|
||||
<color name="mapboxTeal">#41AFA5</color>
|
||||
<color name="mapboxOrange">#F9886C</color>
|
||||
<color name="mapboxRed">#E55E5E</color>
|
||||
<color name="mapboxPink">#ED6498</color>
|
||||
<color name="mapboxYellow">#f1f075</color>
|
||||
<color name="mapboxMustard">#FBB03B</color>
|
||||
<color name="mapboxNavy">#28353D</color>
|
||||
<color name="mapboxNavyDark">#222B30</color>
|
||||
|
||||
</resources>
|
||||
@@ -1,6 +0,0 @@
|
||||
<resources>
|
||||
<string name="app_name">MapboxGLAndroidSDKWearTestApp</string>
|
||||
|
||||
<!-- Feature Titles -->
|
||||
<string name="activity_simple_mapview_title">A simple map view</string>
|
||||
</resources>
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.mapbox.weartestapp.utils;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.mockito.InjectMocks;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public class OffsettingHelperTest {
|
||||
|
||||
private static final double DELTA = 1e-15;
|
||||
|
||||
@InjectMocks
|
||||
View view = mock(View.class);
|
||||
|
||||
@Test
|
||||
public void testAnchorOffset() {
|
||||
float[] offset = new float[2];
|
||||
int viewHeight = 50;
|
||||
when(view.getHeight()).thenReturn(viewHeight);
|
||||
OffsettingHelper offsettingHelper = new OffsettingHelper();
|
||||
offsettingHelper.adjustAnchorOffsetXY(view, offset);
|
||||
assertEquals("Offset of " + viewHeight + " should be divided by 2: ", viewHeight / 2, offset[0], DELTA);
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,6 @@ ext {
|
||||
|
||||
mapboxServicesVersion = "2.1.3"
|
||||
supportLibVersion = "25.3.1"
|
||||
wearableVersion = '2.0.0'
|
||||
espressoVersion = '2.2.2'
|
||||
testRunnerVersion = '0.5'
|
||||
leakCanaryVersion = '1.5'
|
||||
@@ -41,10 +40,6 @@ ext {
|
||||
supportDesign : "com.android.support:design:${supportLibVersion}",
|
||||
supportRecyclerView : "com.android.support:recyclerview-v7:${supportLibVersion}",
|
||||
|
||||
// wear
|
||||
wearCompile : "com.google.android.support:wearable:${wearableVersion}",
|
||||
wearProvided : "com.google.android.wearable:wearable:${wearableVersion}",
|
||||
|
||||
// square crew
|
||||
timber : 'com.jakewharton.timber:timber:4.5.1',
|
||||
okhttp3 : 'com.squareup.okhttp3:okhttp:3.8.0',
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
include ':MapboxGLAndroidSDK'
|
||||
include ':MapboxGLAndroidSDKTestApp'
|
||||
include ':MapboxGLAndroidSDKWearTestApp'
|
||||
include ':MapboxGLAndroidSDK', ':MapboxGLAndroidSDKTestApp'
|
||||
Reference in New Issue
Block a user