Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clipboard][Android] Fixed crash in clipboard listener on Android SDK <26 #21383

Merged
merged 3 commits into from
Mar 1, 2023
Merged

[clipboard][Android] Fixed crash in clipboard listener on Android SDK <26 #21383

merged 3 commits into from
Mar 1, 2023

Conversation

frw
Copy link
Contributor

@frw frw commented Feb 24, 2023

Why

On devices with Android versions below 8 (SDK 26), the changes in #19723 causes the app to crash whenever a string is copied due to using the getTimestamp() function that is only available on SDK 26 and above: https://developer.android.com/reference/android/content/ClipDescription#getTimestamp()

How

Add a check to ensure Build.VERSION.SDK_INT >= Build.VERSION_CODES.O before calling clip.timestamp.

Test Plan

Ran yarn android in apps/bare-expo

Checklist

@frw frw requested review from tsapeta and barthap as code owners February 24, 2023 16:12
@expo-bot
Copy link
Collaborator

Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines.

I've found some issues in your pull request that should be addressed (click on them for more details) 👇

⚠️ Suggestion: Missing changelog entries


Your changes should be noted in the changelog. Read Updating Changelogs guide and consider adding an appropriate entry to the following changelogs:


Generated by ExpoBot 🤖 against fb37748

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Feb 24, 2023
@expo-bot
Copy link
Collaborator

Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines.

I've found some issues in your pull request that should be addressed (click on them for more details) 👇

⚠️ Suggestion: Missing links in changelog entries


I've added some suggestions below, you can just apply and commit them 😉


Generated by ExpoBot 🤖 against 709908f

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
@frw
Copy link
Contributor Author

frw commented Feb 28, 2023

Hey @lukmccall @tsapeta @barthap,

Any chance you could take a look at this? I can definitely reproduce this issue, and it is affecting a small portion of users who are still on old Android versions.

@lukmccall lukmccall merged commit 1ef1f8a into expo:main Mar 1, 2023
Kudo pushed a commit that referenced this pull request Mar 3, 2023
… <26 (#21383)

# Why

On devices with Android versions below 8 (SDK 26), the changes in #19723 causes the app to crash whenever a string is copied due to using the `getTimestamp()` function that is only available on SDK 26 and above: https://developer.android.com/reference/android/content/ClipDescription#getTimestamp()

# How

Add a check to ensure `Build.VERSION.SDK_INT >= Build.VERSION_CODES.O` before calling `clip.timestamp`.

# Test Plan

Ran `yarn android` in `apps/bare-expo`

(cherry picked from commit 1ef1f8a)
@Kudo Kudo added the published Changes from the PR have been published to npm label Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: suggestions ExpoBot has some suggestions published Changes from the PR have been published to npm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants