Repository navigation
Conversation
- Replace deprecated readKeyRing() with readKey() across EmailUtil, MsgsCacheManager, WkdClient, DiskLruCacheSnapshotExt, IterableExt, and DraftViewModel. - Migrate ConsumerOptions.get() to ConsumerOptions.get(api) in PgpDecryptAndOrVerify. - Migrate EncryptionOptions.get() and SigningOptions.get() to pass api in PgpEncryptAndOrSign. - Migrate unlockSecretKey to pass algorithmPolicy in PgpKey. - Update PGPSecretKeyRingExt to use extension toPublicKeyRing(). - Update KeysStorageImpl to use KeyIdentifier instead of Long. - Migrate deprecated InputMethodManager.SHOW_IMPLICIT in ViewExt. - Preserved intentional @Suppress annotations. Verified with Gradle.
DenBond7
marked this pull request as ready for review
November 15, 2026 21:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes compilation deprecation warnings across the
FlowCryptmodule (main, unit tests, androidTest and the Gradle build script), so the build no longer relies on APIs scheduled for removal.close #3332
Changes
PGP (PGPainless 2.x / BouncyCastle)
readKeyRing()→readKey()(EmailUtil,MsgsCacheManager,WkdClient,DiskLruCacheSnapshotExt,IterableExt,DraftViewModel)ConsumerOptions.get()/EncryptionOptions.get()/SigningOptions.get()→get(api)(PgpDecryptAndOrVerify,PgpEncryptAndOrSign,PgpSignature)UnlockSecretKey.unlockSecretKey()now getsalgorithmPolicy(PgpKey)SecretKeyPassphraseProviderimplementations useKeyIdentifieronly, without the deprecatedLong keyIdoverrides (KeysStorageImpl)keyIdcomparison →SubkeyIdentifierinPgpMsgparseKeysOrCertificates()(IterableExt.toPGPPublicKeyRingCollection(),WkdClient).parseKeys()accepts only secret keys and threwEncountered unexpected packet: PGPPublicKeyRing, which broke encryption for recipients' public keys. This regression came in with thereadKey()migration and was caught byThreadDetailsGmailApiFlowTest.WkdClientlimits a WKD response to 1 MiB before parsing. Unlike the oldpublicKeyRingCollection(),parseKeysOrCertificates()reads the whole stream into memory, so an oversized response could cause anOutOfMemoryError.UI
bundleOf→ type-safeBundleacross 34 fragments/dialogs, keeping the existing Fragment ResultBundlecontractsInputMethodManager.SHOW_IMPLICIT→0inViewExt.showKeyboard()Other
EmailAndNameWorker:Data.getStringArray()→getNullableStringArray(), skipsnullemailsbuild.gradle.kts: droppedmultiDexEnabled(not needed withminSdk = 29);assets.srcDir()→assets.directories.add();by configurations.creating/by configurations.named()→configurations.create()/configurations.named()Tests
readKeyRing(),KeyRingUtils.publicKeyRingFrom(),ConsumerOptions.get()and theLong keyIdpassphrase-provider overridesParcelableTest: typedreadParcelable(loader, Class)on API 33+, with the old call kept under@Suppressfor older SDKsMessageMetadata.recipientKeyIds→recipientKeyIdentifiersIterableExtTestcoverstoPGPPublicKeyRingCollection()/toPGPSecretKeyRingCollection(). It fails without theparseKeysOrCertificates()fix.InputStreamExtTestandWkdClientTest.oversizedResponseTestcover the WKD response size limit.The only deprecation warning left is
BaseTest.toastWrapperToHaveDeprecationInOnePlace(). It is an intentional marker that keeps the broken Toast assertions visible (android/android-test#803).Tests (delete all except exactly one):
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):