Skip to content

Don't crash when tapping a document that has no data - #2252

Draft
mpretty-cyro wants to merge 1 commit into
devfrom
fix/open-document-null-uri
Draft

mpretty-cyro wants to merge 1 commit into
devfrom
fix/open-document-null-uri

Conversation

@mpretty-cyro

Copy link
Copy Markdown
Collaborator

Contributor checklist

  • I have tested my contribution on these devices:
  • Compiled only; not exercised on a device (see Testing below)
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax

Description

Crash cluster: NullPointerException in ContentUris.parseId from PartUriParser.getId ←
PartAuthority.getAttachmentPublicUri ← VisibleMessageContentView document click. Outgoing documents are tappable before
reaching DONE, and such a part can have a null URI. Tapping one now shows the existing "unable to open" toast.

Testing: compiled. Not reproduced; it needs an outgoing document whose part has no URI.

Outgoing documents are tappable before their attachment reaches DONE, and
such a part can have a null URI. PartUriParser then threw a
NullPointerException. Show the existing "unable to open" toast instead.

@mpretty-cyro mpretty-cyro left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

lgtm

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.

1 participant