* Fix NPE in Site Settings when refreshing GBKit toggle with null site (#22953)
The refresh runs from an async onSettingsUpdated callback that only guards
with isAdded(), so mSite can be null when isBlockEditorDefault — a non-null
Kotlin param — is invoked, crashing on the generated null check.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Fix Sentry 3GCQ/3GDH: keep Gson-deserialized models from R8 full mode (#22954)
* Fix Sentry WORDPRESS-ANDROID-3GCQ, WORDPRESS-ANDROID-3GDH: keep recommend models from R8
AGP 9's R8 full mode (introduced in 26.8) was transforming
RecommendApiCallsProvider$RecommendTemplateData, causing
InstantiationException and ClassCastException when Gson tried
to deserialize the /mobile/share-app-link response.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Keep additional Gson-deserialized models from R8
Audit of fromJson<T> call sites surfaced more Kotlin data classes
that AGP 9's R8 full mode could class-merge or strip the same way
it did to RecommendTemplateData. Adds -keep rules for:
- InviteLinksApiCallsProvider.InviteLinksItem
- ReaderReadingPreferences (incl. Theme/FontFamily/FontSize enums)
- SubfilterListItemMapper.MappedSubfilterListItem
- StatsCardsConfiguration + StatsCardType
- SubscribersCardsConfiguration + SubscribersCardType
- InsightsCardsConfigurationRepository.PersistedConfig + InsightsCardType
These have not yet appeared in Sentry for 26.8-rc-5, but the rc-5
user base is small and the affected paths (Reader startup, new
stats screens, invite links) are high-traffic enough that they
would likely surface in Beta/GA.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Fix NPE when application password response is missing password or UUID (#22952)
The Gson-deserialized ApplicationPasswordCreationResponse declared its
fields as non-null, but Gson populates objects via reflection and bypasses
Kotlin's null checks. When the API returns a 200 response missing the
`password` or `uuid` field, those nulls flowed into the non-null
ApplicationPasswordCreationPayload constructor, crashing the app (in the
minified release build the parameter null-check compiles to a bare
getClass() call, producing the reported NPE).
Make the response fields nullable and validate them, returning the existing
error payload instead of crashing. Applied to both the Jetpack and WP-API
clients, which share the response type.
Crash report: https://a8c.sentry.io/issues/7522022287/
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Update translations
* Update WordPress metadata translations for 26.8
* Update Jetpack metadata translations for 26.8
* Bump version number
* Update translations
* Bump version number
---------
Co-authored-by: Adalberto Plaza <adalpari@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Nick Bradbury <nbradbury@users.noreply.github.com>
Co-authored-by: Automattic Release Bot <mobile+wpmobilebot@automattic.com>
Description
Fixes a crash in Site Settings (Sentry issue,
com.jetpack.android@26.8-rc-5+1493).SiteSettingsProviderImpl.isBlockEditorDefault(site: SiteModel)declares a non-null Kotlinsiteparameter. The refresh of the GutenbergKit toggle is reached from the asynconSettingsUpdated()callback (SiteSettingsInterface→Handler), which only guards withisAdded(). WhenmSiteisnullat that point, Java passesnullinto the non-null param and the compiler-generatedIntrinsics.checkNotNullParametercheck throws an NPE ("Attempt to invoke … getClass() on a null object reference").This adds an
mSite == nullearly-return guard torefreshGutenbergKitToggleAvailability(), matching themSitenull-guard pattern already used elsewhere in the fragment.Testing instructions
Open Site Settings: