Fixed
Status Update
Comments
jm...@google.com <jm...@google.com> #2
I see what you are saying, will take a look. Thanks for reporting!
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit c95f0efee164d3f5fba6e92471e7731d1edda6ed
Author: Jon Markoff <jmarkoff@google.com>
Date: Thu May 14 11:50:55 2020
Fixed apply for EncryptedSharedPreferences.
apply now also removes keys similar to commit.
Test: Test updated and runs successfully.
Bug: 154366606
Change-Id: I2906984118a5cf4e200b5a011b9addd16de710b7
M security/crypto/src/androidTest/java/androidx/security/crypto/EncryptedSharedPreferencesTest.java
M security/crypto/src/main/java/androidx/security/crypto/EncryptedSharedPreferences.java
https://android-review.googlesource.com/1312015
Branch: androidx-master-dev
commit c95f0efee164d3f5fba6e92471e7731d1edda6ed
Author: Jon Markoff <jmarkoff@google.com>
Date: Thu May 14 11:50:55 2020
Fixed apply for EncryptedSharedPreferences.
apply now also removes keys similar to commit.
Test: Test updated and runs successfully.
Bug: 154366606
Change-Id: I2906984118a5cf4e200b5a011b9addd16de710b7
M security/crypto/src/androidTest/java/androidx/security/crypto/EncryptedSharedPreferencesTest.java
M security/crypto/src/main/java/androidx/security/crypto/EncryptedSharedPreferences.java
an...@google.com <an...@google.com> #5
ph...@gmail.com <ph...@gmail.com> #6
Thanks a lot.
Description
I'm using the EncryptedSharedPreferences from androidx.security:security-crypto:1.0.0-rc01 .
I noticed that prefs.edit().clear().apply() does not actually clear the preferences, while prefs.edit().clear().commit() works.
Looking at the code of EncryptedSharedPreferences, I see that in the editor's commit method, mClearRequested is tested, while in the apply method it is not. This is clearly a bug.