BIT-1954: Autofill Items with TOTP Codes Do Not Autofill on Pre Android 11 (#1158)

This commit is contained in:
Ramsey Smith 2024-03-19 10:02:24 -07:00 committed by Álison Fernandes
parent bd58dac0ff
commit d7b553e4ef

View file

@ -59,9 +59,9 @@ fun createTotpCopyIntentSender(
)
.apply {
putExtra(
AUTOFILL_TOTP_COPY_DATA_KEY,
AutofillTotpCopyData(
cipherId = cipherId,
AUTOFILL_BUNDLE_KEY,
bundleOf(
AUTOFILL_TOTP_COPY_DATA_KEY to AutofillTotpCopyData(cipherId = cipherId),
),
)
}
@ -141,4 +141,5 @@ fun Intent.getAutofillSelectionDataOrNull(): AutofillSelectionData? =
* returned when present.
*/
fun Intent.getTotpCopyIntentOrNull(): AutofillTotpCopyData? =
this.getSafeParcelableExtra(AUTOFILL_TOTP_COPY_DATA_KEY)
getBundleExtra(AUTOFILL_BUNDLE_KEY)
?.getSafeParcelableExtra(AUTOFILL_TOTP_COPY_DATA_KEY)