Fixed
Status Update
Comments
ch...@gmail.com <ch...@gmail.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit b9b1326edfe38588a9882e1ee624798966c5686a
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Oct 06 16:49:53 2021
Clear focus on Fragments animating out
Since moving to the new state manager, fragment now explicitly handle
focus where in the old world they could ignore it altogether. This
change has the side effect that other things affected by focus (i.e.
soft keyboard input) are affect as well. In particular when we
requestFocus we update the input request, but since we never clear it
users have to manually remove the input.
When we are animating a fragment view out, since we will no longer be
using the exiting view, let clear the focus of before we remove it from
the fragment.
RelNote: "The keyboard will now close automatically when going from
a fragment with an open keyboard to a fragment with a recycler view."
Test: tested in sample app from bug
Bug: 196852211
Change-Id: I8b842dd9a421cfbc9189014b802f5e4b6b9c2a47
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
https://android-review.googlesource.com/1847143
Branch: androidx-main
commit b9b1326edfe38588a9882e1ee624798966c5686a
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Oct 06 16:49:53 2021
Clear focus on Fragments animating out
Since moving to the new state manager, fragment now explicitly handle
focus where in the old world they could ignore it altogether. This
change has the side effect that other things affected by focus (i.e.
soft keyboard input) are affect as well. In particular when we
requestFocus we update the input request, but since we never clear it
users have to manually remove the input.
When we are animating a fragment view out, since we will no longer be
using the exiting view, let clear the focus of before we remove it from
the fragment.
RelNote: "The keyboard will now close automatically when going from
a fragment with an open keyboard to a fragment with a recycler view."
Test: tested in sample app from bug
Bug: 196852211
Change-Id: I8b842dd9a421cfbc9189014b802f5e4b6b9c2a47
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
li...@gmail.com <li...@gmail.com> #3
This has been fixed internally and will be available in the Fragment 1.4.0-beta01
release.
mi...@gmail.com <mi...@gmail.com> #4
The issue still persist in API version 27 and below in Fragment 1.4.0
li...@gmail.com <li...@gmail.com> #5
The same problem here.
ch...@gmail.com <ch...@gmail.com> #6
I ran into the same problem.
I've submitted a change to fix EncryptedSharedPreferences.Editor#remove here:
If that change is accepted, I'll consider submitting a change to fix SharedPreferences.Editor#clear as well.
da...@google.com <da...@google.com> #7
Thanks so much for writing the change with tests! Looks like we forgot to merge this in. Will hopefully merge later today.
we...@sky.uk <we...@sky.uk> #8
There are two issues raised in this ticket clear and remove Alpha 04 appears to fix remove, but will there be a follow up fix for clear as well?
[Deleted User] <[Deleted User]> #9
We're currently on 1.1.0-alpha03, and getting these crashes in very high numbers on a daily basis, seems like remove() has been fixed but clear() has not.
Fatal Exception: java.lang.SecurityException: Could not decrypt key. decryption failed
at androidx.security.crypto.EncryptedSharedPreferences.decryptKey(EncryptedSharedPreferences.java:612)
at androidx.security.crypto.EncryptedSharedPreferences.getAll(EncryptedSharedPreferences.java:402)
at androidx.security.crypto.EncryptedSharedPreferences$Editor.clearKeysIfNeeded(EncryptedSharedPreferences.java:358)
at androidx.security.crypto.EncryptedSharedPreferences$Editor.commit(EncryptedSharedPreferences.java:337)
at com.kisannetwork.local_db.PrefManager.clearAll(PrefManager.java:235)
at com.kisannetwork.authUtils.TokenAuthenticator.authenticate$lambda-3(TokenAuthenticator.java:76)
at com.kisannetwork.authUtils.TokenAuthenticator.lambda$0aBc6DZ4PIivHSPy8l7dz_WGUCE(TokenAuthenticator.java)
at com.kisannetwork.authUtils.-$$Lambda$TokenAuthenticator$0aBc6DZ4PIivHSPy8l7dz_WGUCE.run(-.java:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Description
Component used: androidx.security:security-crypto-ktx:1.1.0-alpha03 (EncryptedSharedPreferences)
Version used: 1.1.0-alpha03
Devices/Android versions reproduced on: API 31 (likely to be all)
I've created a sample project with minimum code to reproduce:https://github.com/ChristianGarcia/ObserveEncryptedPrefsBug