Skip to content

Commit d177d6b

Browse files
feat: removed deprecated registrar
1 parent 5bede6f commit d177d6b

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

example/android/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8-
8+
/app/.cxx/
99
# Remember to never publicly share your keystore.
1010
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
1111
key.properties

maplibre_gl/android/src/main/java/org/maplibre/maplibregl/GlobalMethodHandler.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,9 @@ class GlobalMethodHandler implements MethodChannel.MethodCallHandler {
2626
private static final int BUFFER_SIZE = 1024 * 2;
2727
@NonNull private final Context context;
2828
@NonNull private final BinaryMessenger messenger;
29-
@Nullable private PluginRegistry.Registrar registrar;
3029
@Nullable private FlutterPlugin.FlutterAssets flutterAssets;
3130
@Nullable private OfflineChannelHandlerImpl downloadOfflineRegionChannelHandler;
3231

33-
GlobalMethodHandler(@NonNull PluginRegistry.Registrar registrar) {
34-
this.registrar = registrar;
35-
this.context = registrar.activeContext();
36-
this.messenger = registrar.messenger();
37-
}
3832

3933
GlobalMethodHandler(@NonNull FlutterPlugin.FlutterPluginBinding binding) {
4034
this.context = binding.getApplicationContext();
@@ -152,9 +146,7 @@ private InputStream openTilesDbFile(String tilesDb) throws IOException {
152146
return new FileInputStream(new File(tilesDb));
153147
} else {
154148
String assetKey;
155-
if (registrar != null) {
156-
assetKey = registrar.lookupKeyForAsset(tilesDb);
157-
} else if (flutterAssets != null) {
149+
if (flutterAssets != null) {
158150
assetKey = flutterAssets.getAssetFilePathByName(tilesDb);
159151
} else {
160152
throw new IllegalStateException();

0 commit comments

Comments
 (0)