diff options
| author | Ignacio Solla <igsolla@google.com> | 2014-10-29 11:10:51 +0000 |
|---|---|---|
| committer | Ignacio Solla <igsolla@google.com> | 2014-10-31 11:25:49 +0000 |
| commit | bf95f761ba3d2dee0ee98b7204d289f35c4f478d (patch) | |
| tree | cb98260433395cc2068afbfe0330904b42819955 | |
| parent | 620317df09cbb4425b366ad48f7a86e9016a53d4 (diff) | |
| download | android_frameworks_webview-bf95f761ba3d2dee0ee98b7204d289f35c4f478d.tar.gz android_frameworks_webview-bf95f761ba3d2dee0ee98b7204d289f35c4f478d.tar.bz2 android_frameworks_webview-bf95f761ba3d2dee0ee98b7204d289f35c4f478d.zip | |
[WebView] Remove dependency on Build.IS_DEBUGGABLE.
BUG:18152150
Change-Id: If9c8e28f6dd737ae0f677afc89ef5136a8e2268b
| -rw-r--r-- | chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java b/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java index cbeead5..8043ad8 100644 --- a/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java +++ b/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java @@ -99,7 +99,7 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider { private SharedPreferences mWebViewPrefs; public WebViewChromiumFactoryProvider() { - if (Build.IS_DEBUGGABLE) { + if (isBuildDebuggable()) { // Suppress the StrictMode violation as this codepath is only hit on debugglable builds. StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); CommandLine.initFromFile(COMMAND_LINE_FILE); @@ -142,6 +142,10 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider { // Now safe to use WebView data directory. } + private static boolean isBuildDebuggable() { + return !Build.TYPE.equals("user"); + } + private static void deleteContents(File dir) { File[] files = dir.listFiles(); if (files != null) { |
