Before Android 13, the first access to a Bundle received over IPC
unparcels all its entries, including the avatar bitmap. Guard the
userId read so that a failure to unparcel the avatar does not escape
the handler.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Pass media captions as HTML to the media viewer
`MediaInfo` and `GalleryInfo` carried the formatted caption as a `CharSequence`, which isn't a good fit for `Parcelable` classes. Some producers also passed the raw HTML body in that field, so the caption was rendered with its tags, and gallery messages didn't pass a formatted caption at all.
Replace `formattedCaption` with `htmlCaption: String?` and convert it to styled text in `MediaViewerPresenter`, using the same `HtmlConverterProvider` as the timeline. The converted captions are cached by HTML so page data equality stays stable across list updates.
* Pillify media captions in the media viewer
Move the `TextPillificationHelper` interface to `:features:messages:api` so the media viewer can use it, keeping `DefaultTextPillificationHelper` in the impl module. The fake moves to `:features:messages:test`.
`MediaViewerPresenter` now pillifies converted HTML captions before linkifying them, matching how captions are rendered in the timeline.
* Rename `TextPillificationHelper` to `TextPillificator`, also fix copyright notice.
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Element Classic can send the user avatar at its original resolution
(e.g. 6765x6765, ~183MB as ARGB_8888), which makes the login screen
crash with "Canvas: trying to draw too large bitmap".
Downscale the avatar to at most 512px on its longest side when it is
received, and fall back to no avatar if it cannot be read.
Fixes#7986
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This adds a feature flag, disabled by default, which disables the 'don't receive push notifications from other accounts used in this device' rule, which is useful in general, but problematic for testing.
The client used to log in was built with `autoEnableBackups(true)` and `autoEnableCrossSigning(true)`.
Its SDK initialization task (cross-signing bootstrap, key backup creation) could still be running
after it was closed, while the final client, which uses the same store, was doing the same work.
This led to duplicate key backups and lost cross-signing private keys on new accounts.
Only the final client now sets up the backup and the cross-signing.
Closes#7955
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The parameter is named `key` in the SDK `ClientBuilder`. The mismatch was reported as a warning,
which failed the compilation of the unit tests since warnings are errors.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The step names said "Set up Python 3.12" while the actual version is set by python-version and updated by Renovate, so the names got out of sync.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Cover the multi account branches of RootFlowNode.onLoginLink:
- the session matching the login hint becomes the latest session
- the login link is ignored when multi account is disabled
- the login link is ignored when the account provider is not allowed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The fetch of the ignored users list from the server at startup is a workaround for an SDK issue, link it so that it
can be removed once the issue is fixed.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The SDK emits its in-memory ignored users list as soon as we subscribe to it. This list is empty until the account data
is received by the sync, which usually does not happen after a restart since the account data has not changed. This
empty list was overriding the list fetched from the server, so the blocked users entry was hidden in the settings, and
the blocked users list was not updated when unblocking a user.
Subscribe first and then fetch the list from the server, and keep the subscription alive even if the fetch fails.
Fixes#7725, #7726
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>