diff --git a/packages/path_provider/path_provider_android/CHANGELOG.md b/packages/path_provider/path_provider_android/CHANGELOG.md index f9d3543a92d4..1282ab6e20a9 100644 --- a/packages/path_provider/path_provider_android/CHANGELOG.md +++ b/packages/path_provider/path_provider_android/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.0.11 + +* Temporarily reverts the platform channel name change from 2.0.10 in order to + restore compatibility with Flutter versions earlier than 2.8. + ## 2.0.10 * Switches to a package-internal implementation of the platform interface. diff --git a/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java b/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java index 278ff58b59dc..3ff2416527d0 100644 --- a/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java +++ b/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java @@ -153,7 +153,7 @@ public void getApplicationSupportDirectory(@NonNull Result result) { public PathProviderPlugin() {} private void setup(BinaryMessenger messenger, Context context) { - String channelName = "plugins.flutter.io/path_provider_android"; + String channelName = "plugins.flutter.io/path_provider"; // TODO(gaaclarke): Remove reflection guard when https://github.com/flutter/engine/pull/29147 // becomes available on the stable branch. try { diff --git a/packages/path_provider/path_provider_android/lib/path_provider_android.dart b/packages/path_provider/path_provider_android/lib/path_provider_android.dart index b0f3808d2859..281cc5141eda 100644 --- a/packages/path_provider/path_provider_android/lib/path_provider_android.dart +++ b/packages/path_provider/path_provider_android/lib/path_provider_android.dart @@ -11,7 +11,7 @@ class PathProviderAndroid extends PathProviderPlatform { /// The method channel used to interact with the native platform. @visibleForTesting MethodChannel methodChannel = - const MethodChannel('plugins.flutter.io/path_provider_android'); + const MethodChannel('plugins.flutter.io/path_provider'); /// Registers this class as the default instance of [PathProviderPlatform]. static void registerWith() { diff --git a/packages/path_provider/path_provider_android/pubspec.yaml b/packages/path_provider/path_provider_android/pubspec.yaml index 5664ebf7944c..393aef4cfd35 100644 --- a/packages/path_provider/path_provider_android/pubspec.yaml +++ b/packages/path_provider/path_provider_android/pubspec.yaml @@ -2,7 +2,7 @@ name: path_provider_android description: Android implementation of the path_provider plugin. repository: https://github.com/flutter/plugins/tree/master/packages/path_provider/path_provider_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_provider%22 -version: 2.0.10 +version: 2.0.11 environment: sdk: ">=2.14.0 <3.0.0" diff --git a/packages/path_provider/path_provider_android/test/path_provider_android_test.dart b/packages/path_provider/path_provider_android/test/path_provider_android_test.dart index d2f9682bf6d7..2388059f0b34 100644 --- a/packages/path_provider/path_provider_android/test/path_provider_android_test.dart +++ b/packages/path_provider/path_provider_android/test/path_provider_android_test.dart @@ -52,6 +52,14 @@ void main() { log.clear(); }); + // TODO(stuartmorgan): Change this to a test that it uses a different name, + // to avoid potential confusion, once the SDK is changed to 2.8+. See + // https://github.com/flutter/plugins/pull/4617#discussion_r774673962 + test('channel name is compatible with shared method channel', () async { + expect( + pathProvider.methodChannel.name, 'plugins.flutter.io/path_provider'); + }); + test('getTemporaryPath', () async { final String? path = await pathProvider.getTemporaryPath(); expect(