title: Android Pie (9.0) WebView in multi-process
body: <p>Starting Android Pie (API 28), Google isn't allowing using a single WebView instance in 2 different processes.</p>
  
  <p>Documentation: <a href="https://developer.android.com/reference/android/webkit/WebView.html#setDataDirectorySuffix(java.lang.String)" rel="noreferrer">https://developer.android.com/reference/android/webkit/WebView.html#setDataDirectorySuffix(java.lang.String)</a></p>
  
  <p>As required, I called <code>WebView.setDataDirectorySuffix("dir_name_no_separator")</code> but unfortunately, I get an exception.
  I tried to call this method inside the 2nd process Service onCreate().</p>
  
  <pre><code>java.lang.RuntimeException: Unable to create service com.myapp.service.MyService: java.lang.IllegalStateException: Can't set data directory suffix: WebView already initialized
          at android.app.ActivityThread.handleCreateService(ActivityThread.java:3544)
          at android.app.ActivityThread.access$1300(ActivityThread.java:199)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1666)
          at android.os.Handler.dispatchMessage(Handler.java:106)
          at android.os.Looper.loop(Looper.java:193)
          at android.app.ActivityThread.main(ActivityThread.java:6669)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
       Caused by: java.lang.IllegalStateException: Can't set data directory suffix: WebView already initialized
          at android.webkit.WebViewFactory.setDataDirectorySuffix(WebViewFactory.java:136)
          at android.webkit.WebView.setDataDirectorySuffix(WebView.java:2165)
          at com.myapp.service.MyService.onCreate(MyService.java:134)
  </code></pre>
  
  <p>I couldn't find any reason for that exception. I didn't call this method twice nor I called it in my main process. Any ideas?</p>