Context.getSharedPreferences can now cause disk writes as of N |
|||||||||
Issue descriptionIn Android N and later, Context.getSharedPreferences will cause a disk write if the preferences directory doesn't exist, triggering a strict mode violation. This can cause WebView to fail CTS in some cases. Most real apps probably won't see this issue as they likely already touched their preference directory before invoking WebView, but it's not impossible for this to show up in real usage. There's no way to avoid this so we'll just need to suppress the strict mode violation around the relevant code in WebViewChromiumFactoryProvider. We should also check if any non-WebView (i.e. Chrome) uses of getSharedPreferences may be affected, though I don't know how much Chrome cares about strict mode violations that only happen on first run.
,
Apr 28 2017
,
Apr 28 2017
Your change meets the bar and is auto-approved for M59. Please go ahead and merge the CL to branch 3071 manually. Please contact milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c5936af34a8293a610623e93e397e04725d3d51f commit c5936af34a8293a610623e93e397e04725d3d51f Author: Torne (Richard Coles) <torne@google.com> Date: Fri Apr 28 19:27:24 2017 Allow disk writes while checking webview version pref. Since N, the preference directory will be created if it doesn't exist when getSharedPreferences is called. Enable disk writes to prevent a strict mode violation; this will only happen the first time an app is started up. BUG= 716219 Review-Url: https://codereview.chromium.org/2846963005 Cr-Commit-Position: refs/heads/master@{#468052} (cherry picked from commit fe20a56ce5c36f7a29880586d67ca5e82aea3756) Review-Url: https://codereview.chromium.org/2851833002 . Cr-Commit-Position: refs/branch-heads/3071@{#300} Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641} [modify] https://crrev.com/c5936af34a8293a610623e93e397e04725d3d51f/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
,
Apr 28 2017
,
May 2 2017
,
May 2 2017
,
May 5 2017
Approved for M58 branch 3029, please merge by EOD if possible.
,
May 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/33e41155e73f47258881df86fc6ce6ee33626ed3 commit 33e41155e73f47258881df86fc6ce6ee33626ed3 Author: Torne (Richard Coles) <torne@google.com> Date: Fri May 05 19:37:45 2017 Allow disk writes while checking webview version pref. Since N, the preference directory will be created if it doesn't exist when getSharedPreferences is called. Enable disk writes to prevent a strict mode violation; this will only happen the first time an app is started up. BUG= 716219 Review-Url: https://codereview.chromium.org/2846963005 Cr-Commit-Position: refs/heads/master@{#468052} (cherry picked from commit fe20a56ce5c36f7a29880586d67ca5e82aea3756) Review-Url: https://codereview.chromium.org/2865733002 . Cr-Commit-Position: refs/branch-heads/3029@{#806} Cr-Branched-From: 939b32ee5ba05c396eef3fd992822fcca9a2e262-refs/heads/master@{#454471} [modify] https://crrev.com/33e41155e73f47258881df86fc6ce6ee33626ed3/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
,
May 5 2017
,
May 8 2017
|
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by bugdroid1@chromium.org
, Apr 28 2017