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

Fix card title can't open Trello app #45

Merged
merged 1 commit into from
May 12, 2024
Merged

Conversation

MatHazak
Copy link
Collaborator

@MatHazak MatHazak commented May 4, 2024

When I checked the commit history, I found that #44 occurs after 74c9405.
The issue was around FLAG_IMMUTABLE. Since the intent is updated later in RemoteViewsFactory.setOnClickFillInIntent, this pending intent should be MUTABLE.

Since the intent will be updated later in RemoteViewsFactory.setOnClickFillInIntent, it should be mutable.
Copy link
Owner

@oryanm oryanm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the bugfix!

@@ -105,9 +107,10 @@ class TrelloWidgetProvider : AppWidgetProvider() {
return PendingIntent.getActivity(context, appWidgetId, reconfigIntent, FLAG_IMMUTABLE)
}

@SuppressLint("MutableImplicitPendingIntent")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this for? I don't get a warning without it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the warning I get:

Mutable implicit PendingIntent will throw an exception once this app starts targeting Android 14 or above, follow either of these recommendations: for an existing PendingIntent use FLAG_NO_CREATE and for a new PendingIntent either make it immutable or make the Intent within explicit
Inspection info: Apps targeting Android 14 and above are not allowed to create PendingIntents with FLAG_MUTABLE and an implicit intent within for security reasons. To retrieve an existing PendingIntent, use FLAG_NO_CREATE. To create a new PendingIntent, either make the intent explicit, or make it immutable with FLAG_IMMUTABLE.
Issue id: MutableImplicitPendingIntent

More in the reference.

I guess this PR is not the definitive solution, but a workaround to make things work as before. for new updates to SDK version we may need to make some changes to the app design.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that's fine for now then.

@oryanm oryanm merged commit 6f1c85f into oryanm:master May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants