Skip to content

Commit

Permalink
[flutter_local_notifications] fixed issue with casting message timest…
Browse files Browse the repository at this point in the history
…amps (#2313)

* fixed issue with casting message timestamps

* Google Java Format

* switched integration tests to run on iPhone 15 instead of 13 in sync with simulator action changes

* switched to ubuntu runner for android integration tests

---------

Co-authored-by: github-actions <>
  • Loading branch information
MaikuB committed May 1, 2024
1 parent 6354770 commit aa7ef0a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/validate.yml
Expand Up @@ -118,7 +118,7 @@ jobs:
run: melos run test:unit:android
integration_tests_android:
name: Run integration tests (Android)
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
Expand All @@ -132,6 +132,11 @@ jobs:
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
Expand All @@ -151,7 +156,7 @@ jobs:
- uses: futureware-tech/simulator-action@v3
id: simulator-action
with:
model: 'iPhone 13'
model: 'iPhone 15'
- run: |
brew tap wix/brew
brew install applesimutils
Expand Down
3 changes: 3 additions & 0 deletions flutter_local_notifications/CHANGELOG.md
@@ -1,3 +1,6 @@
## [17.1.1]

* [Android] fixes issue [#2299](https://github.com/MaikuB/flutter_local_notifications/issues/2299) where within the range of the max integer value of epoch time passed to a messaging style would result in a casting exception

## [17.1.0]

Expand Down
Expand Up @@ -458,7 +458,7 @@ private static ArrayList<MessageDetails> readMessages(ArrayList<Map<String, Obje
result.add(
new MessageDetails(
(String) messageData.get(TEXT),
(Long) messageData.get(TIMESTAMP),
LongUtils.parseLong(messageData.get(TIMESTAMP)),
readPersonDetails((Map<String, Object>) messageData.get(PERSON)),
(String) messageData.get(DATA_MIME_TYPE),
(String) messageData.get(DATA_URI)));
Expand Down
2 changes: 1 addition & 1 deletion flutter_local_notifications/pubspec.yaml
Expand Up @@ -2,7 +2,7 @@ name: flutter_local_notifications
description: A cross platform plugin for displaying and scheduling local
notifications for Flutter applications with the ability to customise for each
platform.
version: 17.1.0
version: 17.1.1
homepage: https://github.com/MaikuB/flutter_local_notifications/tree/master/flutter_local_notifications
issue_tracker: https://github.com/MaikuB/flutter_local_notifications/issues

Expand Down

0 comments on commit aa7ef0a

Please sign in to comment.