Change Android package and class names away from mapbox (#1201)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bart Louwers <bart@emeel.net>
This commit is contained in:
fynngodau
2023-06-12 14:04:25 +02:00
committed by GitHub
parent 26094930e9
commit c75e3596da
731 changed files with 9473 additions and 9669 deletions

View File

@@ -200,7 +200,7 @@ void MapSnapshotter::addLayerAt(JNIEnv& env, jlong nativeLayerPtr, jni::jint ind
if (index > numLayers || index < 0) {
Log::Error(Event::JNI, "Index out of range: " + std::to_string(index));
jni::ThrowNew(env,
jni::FindClass(env, "com/mapbox/mapboxsdk/style/layers/CannotAddLayerException"),
jni::FindClass(env, "org/maplibre/android/style/layers/CannotAddLayerException"),
std::string("Invalid index").c_str());
}
// Insert it below the current at that index
@@ -208,7 +208,7 @@ void MapSnapshotter::addLayerAt(JNIEnv& env, jlong nativeLayerPtr, jni::jint ind
layer->addToStyle(snapshotter->getStyle(), layers.at(index)->getID());
} catch (const std::runtime_error& error) {
jni::ThrowNew(
env, jni::FindClass(env, "com/mapbox/mapboxsdk/style/layers/CannotAddLayerException"), error.what());
env, jni::FindClass(env, "org/maplibre/android/style/layers/CannotAddLayerException"), error.what());
}
}
@@ -222,7 +222,7 @@ void MapSnapshotter::addLayerBelow(JNIEnv& env, jlong nativeLayerPtr, const jni:
below ? std::optional<std::string>(jni::Make<std::string>(env, below)) : std::optional<std::string>());
} catch (const std::runtime_error& error) {
jni::ThrowNew(
env, jni::FindClass(env, "com/mapbox/mapboxsdk/style/layers/CannotAddLayerException"), error.what());
env, jni::FindClass(env, "org/maplibre/android/style/layers/CannotAddLayerException"), error.what());
}
}
@@ -247,7 +247,7 @@ void MapSnapshotter::addLayerAbove(JNIEnv& env, jlong nativeLayerPtr, const jni:
if (index > snapshotterLayers.size()) {
// Not found
jni::ThrowNew(env,
jni::FindClass(env, "com/mapbox/mapboxsdk/style/layers/CannotAddLayerException"),
jni::FindClass(env, "org/maplibre/android/style/layers/CannotAddLayerException"),
std::string("Could not find layer: ").append(siblingId).c_str());
} else if (index < snapshotterLayers.size()) {
// Place before the sibling
@@ -259,7 +259,7 @@ void MapSnapshotter::addLayerAbove(JNIEnv& env, jlong nativeLayerPtr, const jni:
newLayer->addToStyle(snapshotter->getStyle(), before);
} catch (const std::runtime_error& error) {
jni::ThrowNew(
env, jni::FindClass(env, "com/mapbox/mapboxsdk/style/layers/CannotAddLayerException"), error.what());
env, jni::FindClass(env, "org/maplibre/android/style/layers/CannotAddLayerException"), error.what());
}
}
@@ -271,7 +271,7 @@ void MapSnapshotter::addSource(JNIEnv& env, const jni::Object<Source>& obj, jlon
source->addToStyle(env, obj, snapshotter->getStyle());
} catch (const std::runtime_error& error) {
jni::ThrowNew(
env, jni::FindClass(env, "com/mapbox/mapboxsdk/style/sources/CannotAddSourceException"), error.what());
env, jni::FindClass(env, "org/maplibre/android/style/sources/CannotAddSourceException"), error.what());
}
}