Commit 8902e046 authored by Torne (Richard Coles)'s avatar Torne (Richard Coles) Committed by Commit Bot

Relax WebView data dir check to only fire on P.

Some apps will need to use the new APIs added in P to configure their
data directories properly, and won't be able to call these on older OS
versions until the support library is ready. For now, relax the check to
only apply when running on P.

Bug: 558377
Change-Id: I57b9889c7e486acb1ebbd6642dfb45eca38b6a06
Reviewed-on: https://chromium-review.googlesource.com/955727Reviewed-by: default avatarTobias Sargeant <tobiasjs@chromium.org>
Commit-Queue: Richard Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542139}
parent 6bd5f280
......@@ -149,8 +149,8 @@ public final class AwBrowserProcess {
private static void tryObtainingDataDirLock() {
// Many existing apps rely on this even though it's known to be unsafe.
// Make it fatal for apps that target P or higher.
boolean dieOnFailure = BuildInfo.targetsAtLeastP();
// Make it fatal when on P for apps that target P or higher
boolean dieOnFailure = BuildInfo.isAtLeastP() && BuildInfo.targetsAtLeastP();
StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskWrites();
try {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment