title: UnsupportedOperationException: WebView is not allowed in privileged processes
body: <p>I am using <code>android:sharedUserId="android.uid.system"</code> in my manifest to obtain some unavoidable rights.  (to read HDMI input from an <a href="http://eweat.manufacturer.globalsources.com/si/6008848465509/pdtl/HD-set-top/1143517456/TV-Box-R9-Mini.htm" rel="nofollow noreferrer">Android box</a>) </p>
  
  <p>My app also uses a <code>webview</code> to serve an important function. <strong>But the combination of using <code>webView</code> and <code>android:sharedUserId="android.uid.system"</code> is causing the following exception (API level 23, rooted device, system app)</strong>:</p>
  
  <p>Caused by: <strong><code>java.lang.UnsupportedOperationException: For security reasons, WebView is not allowed in privileged processes</code></strong></p>
  
  <ol>
  <li>Please suggest a solution to use both in combination. </li>
  <li>What are those security reasons?</li>
  </ol>
  
  <p>Full stack trace:</p>
  
  <pre><code>android.view.InflateException: Binary XML file line #40: Binary XML file line #40: Error inflating class android.webkit.WebView
      at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
      at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
      at com.blynq.app.fragments.PlayerPane.onCreateView(PlayerPane.java:200)
      at android.app.Fragment.performCreateView(Fragment.java:2220)
      at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:973)
      at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1148)
      at android.app.BackStackRecord.run(BackStackRecord.java:793)
      at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1535)
      at android.app.FragmentManagerImpl$1.run(FragmentManager.java:482)
      at android.os.Handler.handleCallback(Handler.java:739)
      at android.os.Handler.dispatchMessage(Handler.java:95)
      at android.os.Looper.loop(Looper.java:148)
      at android.app.ActivityThread.main(ActivityThread.java:5453)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
   Caused by: android.view.InflateException: Binary XML file line #40: Error inflating class android.webkit.WebView
      at android.view.LayoutInflater.createView(LayoutInflater.java:645)
      at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)
      at android.view.LayoutInflater.onCreateView(LayoutInflater.java:694)
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762)
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
      at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
      at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
      at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
      at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
      at com.blynq.app.fragments.PlayerPane.onCreateView(PlayerPane.java:200) 
      at android.app.Fragment.performCreateView(Fragment.java:2220) 
      at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:973) 
      at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1148) 
      at android.app.BackStackRecord.run(BackStackRecord.java:793) 
      at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1535) 
      at android.app.FragmentManagerImpl$1.run(FragmentManager.java:482) 
      at android.os.Handler.handleCallback(Handler.java:739) 
      at android.os.Handler.dispatchMessage(Handler.java:95) 
      at android.os.Looper.loop(Looper.java:148) 
      at android.app.ActivityThread.main(ActivityThread.java:5453) 
      at java.lang.reflect.Method.invoke(Native Method) 
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
   Caused by: java.lang.reflect.InvocationTargetException
      at java.lang.reflect.Constructor.newInstance(Native Method)
      at android.view.LayoutInflater.createView(LayoutInflater.java:619)
      at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58) 
      at android.view.LayoutInflater.onCreateView(LayoutInflater.java:694) 
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762) 
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) 
      at android.view.LayoutInflater.rInflate(LayoutInflater.java:835) 
      at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) 
      at android.view.LayoutInflater.inflate(LayoutInflater.java:515) 
      at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
      at com.blynq.app.fragments.PlayerPane.onCreateView(PlayerPane.java:200) 
      at android.app.Fragment.performCreateView(Fragment.java:2220) 
      at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:973) 
      at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1148) 
      at android.app.BackStackRecord.run(BackStackRecord.java:793) 
      at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1535) 
      at android.app.FragmentManagerImpl$1.run(FragmentManager.java:482) 
      at android.os.Handler.handleCallback(Handler.java:739) 
      at android.os.Handler.dispatchMessage(Handler.java:95) 
      at android.os.Looper.loop(Looper.java:148) 
      at android.app.ActivityThread.main(ActivityThread.java:5453) 
      at java.lang.reflect.Method.invoke(Native Method) 
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
  
  Caused by: java.lang.UnsupportedOperationException: For security reasons, WebView is not allowed in privileged processes
      at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:159)
      at android.webkit.WebView.getFactory(WebView.java:2277)
      at android.webkit.WebView.ensureProviderCreated(WebView.java:2272)
      at android.webkit.WebView.setOverScrollMode(WebView.java:2331)
      at android.view.View.&lt;init&gt;(View.java:3795)
      at android.view.View.&lt;init&gt;(View.java:3898)
      at android.view.ViewGroup.&lt;init&gt;(ViewGroup.java:573)
      at android.widget.AbsoluteLayout.&lt;init&gt;(AbsoluteLayout.java:55)
      at android.webkit.WebView.&lt;init&gt;(WebView.java:597)
      at android.webkit.WebView.&lt;init&gt;(WebView.java:542)
      at android.webkit.WebView.&lt;init&gt;(WebView.java:525)
      at android.webkit.WebView.&lt;init&gt;(WebView.java:512)
      at java.lang.reflect.Constructor.newInstance(Native Method) 
      at android.view.LayoutInflater.createView(LayoutInflater.java:619) 
      at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58) 
      at android.view.LayoutInflater.onCreateView(LayoutInflater.java:694) 
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762) 
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) 
      at android.view.LayoutInflater.rInflate(LayoutInflater.java:835) 
      at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) 
      at android.view.LayoutInflater.inflate(LayoutInflater.java:515) 
      at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
      at com.blynq.app.fragments.PlayerPane.onCreateView(PlayerPane.java:200) 
      at android.app.Fragment.performCreateView(Fragment.java:2220) 
      at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:973) 
      at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1148) 
      at android.app.BackStackRecord.run(BackStackRecord.java:793) 
      at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1535) 
      at android.app.FragmentManagerImpl$1.run(FragmentManager.java:482) 
      at android.os.Handler.handleCallback(Handler.java:739) 
      at android.os.Handler.dispatchMessage(Handler.java:95) 
      at android.os.Looper.loop(Looper.java:148) 
      at android.app.ActivityThread.main(ActivityThread.java:5453) 
      at java.lang.reflect.Method.invoke(Native Method) 
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
  </code></pre>