Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Thanks for the bug report. If you can still reproduce this, can you attach a debugger and report what value for typeId
you see in EncryptedSharedPreferences.getDecryptedObject
?
ap...@google.com <ap...@google.com> #3
The error reporting could be better. The next version will at least make it more clear what's going wrong.
jb...@google.com <jb...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 168d2c90f6a88ff922d2ea72ac3a932c900e590b
Author: Daniel Angell <danielangell@google.com>
Date: Thu Oct 13 14:50:01 2022
Improve error reporting for getDecryptedObject()
Bug: 241699427
Test: Test suite passes. Difficult to add tests for specifically.
Change-Id: If6438b611a5a9ead4ae462cfa79f266ca65bc50d
M security/security-crypto/src/main/java/androidx/security/crypto/EncryptedSharedPreferences.java
https://android-review.googlesource.com/2254976
Branch: androidx-main
commit 168d2c90f6a88ff922d2ea72ac3a932c900e590b
Author: Daniel Angell <danielangell@google.com>
Date: Thu Oct 13 14:50:01 2022
Improve error reporting for getDecryptedObject()
Bug: 241699427
Test: Test suite passes. Difficult to add tests for specifically.
Change-Id: If6438b611a5a9ead4ae462cfa79f266ca65bc50d
M security/security-crypto/src/main/java/androidx/security/crypto/EncryptedSharedPreferences.java
Description
Component used: Fragment Version used: 1.3.0 Devices/Android versions reproduced on: Any
Occurs when we use BottomSheetDialogFragment after updating androidx.fragment:fragment from 1.2.5 to 1.3.0.
Steps to reproduce:
container
container
Expected: A child fragment is added into our container specified in the layout. Actual result: A child fragment added into the container used for CoordinatorLayout.Expected view hierarchy (1.2.5):
Actual view hierarchy (1.3.0):
It seems that it happens because in 1.3.0 a code for finding the right container to use for fragment transaction was changed. A new implementation for DialogFragment is looking for the container starting from the top of hierarchy (DecorView):
At the same time it's different for Fragment:
The only workaround we found is to use a different id for our container, anything but
container
. But this doesn't seem appropriate as we could have a ton of BottomSheets in the project and this kind of id clashing is resolved very well in ordinary fragments.