diff --git a/packages/firebase_messaging/CHANGELOG.md b/packages/firebase_messaging/CHANGELOG.md index a818b23895c8..e12b6f5b6495 100644 --- a/packages/firebase_messaging/CHANGELOG.md +++ b/packages/firebase_messaging/CHANGELOG.md @@ -1,3 +1,7 @@ +## 5.1.6 + +* Fix warnings when compiling on Android. + ## 5.1.5 * Enable background message handling on Android. diff --git a/packages/firebase_messaging/android/build.gradle b/packages/firebase_messaging/android/build.gradle index b3099b7d582b..7209353c45fd 100644 --- a/packages/firebase_messaging/android/build.gradle +++ b/packages/firebase_messaging/android/build.gradle @@ -45,7 +45,7 @@ android { disable 'InvalidPackage' } dependencies { - api 'com.google.firebase:firebase-messaging:18.0.0' + api 'com.google.firebase:firebase-messaging:20.0.0' implementation 'com.google.firebase:firebase-common:16.1.0' implementation 'androidx.annotation:annotation:1.0.0' implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0' diff --git a/packages/firebase_messaging/android/src/main/java/io/flutter/plugins/firebasemessaging/FirebaseMessagingPlugin.java b/packages/firebase_messaging/android/src/main/java/io/flutter/plugins/firebasemessaging/FirebaseMessagingPlugin.java index 28e7eb2f1152..653b164768d2 100644 --- a/packages/firebase_messaging/android/src/main/java/io/flutter/plugins/firebasemessaging/FirebaseMessagingPlugin.java +++ b/packages/firebase_messaging/android/src/main/java/io/flutter/plugins/firebasemessaging/FirebaseMessagingPlugin.java @@ -121,6 +121,7 @@ public void onMethodCall(final MethodCall call, final Result result) { long setupCallbackHandle = 0; long backgroundMessageHandle = 0; try { + @SuppressWarnings("unchecked") Map callbacks = ((Map) call.arguments); setupCallbackHandle = callbacks.get("setupHandle"); backgroundMessageHandle = callbacks.get("backgroundHandle"); diff --git a/packages/firebase_messaging/android/src/main/java/io/flutter/plugins/firebasemessaging/FlutterFirebaseMessagingService.java b/packages/firebase_messaging/android/src/main/java/io/flutter/plugins/firebasemessaging/FlutterFirebaseMessagingService.java index 3b88b98b2c6b..8c2759770a37 100644 --- a/packages/firebase_messaging/android/src/main/java/io/flutter/plugins/firebasemessaging/FlutterFirebaseMessagingService.java +++ b/packages/firebase_messaging/android/src/main/java/io/flutter/plugins/firebasemessaging/FlutterFirebaseMessagingService.java @@ -140,7 +140,7 @@ public void onNewToken(String token) { */ public static void startBackgroundIsolate(Context context, long callbackHandle) { FlutterMain.ensureInitializationComplete(context, null); - String appBundlePath = FlutterMain.findAppBundlePath(context); + String appBundlePath = FlutterMain.findAppBundlePath(); FlutterCallbackInformation flutterCallback = FlutterCallbackInformation.lookupCallbackInformation(callbackHandle); if (flutterCallback == null) { @@ -309,7 +309,7 @@ private static boolean isApplicationForeground(Context context) { KeyguardManager keyguardManager = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); - if (keyguardManager.inKeyguardRestrictedInputMode()) { + if (keyguardManager.isKeyguardLocked()) { return false; } int myPid = Process.myPid(); diff --git a/packages/firebase_messaging/pubspec.yaml b/packages/firebase_messaging/pubspec.yaml index df38e5dbfa5b..9612026f3eab 100644 --- a/packages/firebase_messaging/pubspec.yaml +++ b/packages/firebase_messaging/pubspec.yaml @@ -3,7 +3,7 @@ description: Flutter plugin for Firebase Cloud Messaging, a cross-platform messaging solution that lets you reliably deliver messages on Android and iOS. author: Flutter Team homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_messaging -version: 5.1.5 +version: 5.1.6 flutter: plugin: