Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/location_background/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.0+2

* Fix Dart deprecation warnings.

## 0.1.0+1

* Log a more detailed warning at build time about the previous AndroidX
Expand Down
17 changes: 4 additions & 13 deletions packages/location_background/lib/location_background_plugin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,8 @@ class LocationBackgroundPlugin {
final CallbackHandle handle =
PluginUtilities.getCallbackHandle(_backgroundCallbackDispatcher);
assert(handle != null, 'Unable to lookup callback.');
_channel
// TODO(amirh): remove this on when the invokeMethod update makes it to stable Flutter.
// https://github.com/flutter/flutter/issues/26431
// ignore: strong_mode_implicit_dynamic_method
.invokeMethod(_kStartHeadlessService, <dynamic>[handle.toRawHandle()]);
_channel.invokeMethod<void>(
_kStartHeadlessService, <dynamic>[handle.toRawHandle()]);
}

// The method channel we'll use to communicate with the native portion of our
Expand All @@ -147,10 +144,7 @@ class LocationBackgroundPlugin {
throw ArgumentError.notNull('callback');
}
final CallbackHandle handle = PluginUtilities.getCallbackHandle(callback);
// TODO(amirh): remove this on when the invokeMethod update makes it to stable Flutter.
// https://github.com/flutter/flutter/issues/26431
// ignore: strong_mode_implicit_dynamic_method
return _channel.invokeMethod(_kMonitorLocationChanges, <dynamic>[
return _channel.invokeMethod<bool>(_kMonitorLocationChanges, <dynamic>[
handle.toRawHandle(),
pauseLocationUpdatesAutomatically,
showsBackgroundLocationIndicator,
Expand All @@ -160,8 +154,5 @@ class LocationBackgroundPlugin {

/// Stop all location updates.
Future<void> cancelLocationUpdates() =>
// TODO(amirh): remove this on when the invokeMethod update makes it to stable Flutter.
// https://github.com/flutter/flutter/issues/26431
// ignore: strong_mode_implicit_dynamic_method
_channel.invokeMethod(_kCancelLocationUpdates);
_channel.invokeMethod<void>(_kCancelLocationUpdates);
}
4 changes: 2 additions & 2 deletions packages/location_background/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: location_background_plugin
description: A new flutter plugin project.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/location_background
version: 0.1.0+1
version: 0.1.0+2
publish_to: none

dependencies:
Expand All @@ -20,4 +20,4 @@ flutter:

environment:
sdk: ">=2.0.0-dev.28.0 <3.0.0"
flutter: ">=0.4.4 <2.0.0"
flutter: ">=1.5.0 <2.0.0"
4 changes: 4 additions & 0 deletions packages/package_info/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.0+6

* Fix Android compiler warnings.

## 0.4.0+5

* Add iOS-specific warning to README.md.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void onMethodCall(MethodCall call, Result result) {
PackageManager pm = context.getPackageManager();
PackageInfo info = pm.getPackageInfo(context.getPackageName(), 0);

Map<String, String> map = new HashMap<String, String>();
Map<String, String> map = new HashMap<>();
map.put("appName", info.applicationInfo.loadLabel(pm).toString());
map.put("packageName", context.getPackageName());
map.put("version", info.versionName);
Expand All @@ -54,11 +54,11 @@ public void onMethodCall(MethodCall call, Result result) {
}
}

@SuppressWarnings("deprecation")
private static long getLongVersionCode(PackageInfo info) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
return info.getLongVersionCode();
}
//noinspection deprecation
return info.versionCode;
}
}
2 changes: 1 addition & 1 deletion packages/package_info/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for querying information about the application
package, such as CFBundleVersion on iOS or versionCode on Android.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/package_info
version: 0.4.0+5
version: 0.4.0+6

flutter:
plugin:
Expand Down