We have our System application (.apk) installed on the device with system 
signature. Now we want to use WebView of android for loading HTML pages on 
UI. When we try to use WebView on our application, It does not allow and 
showing below the crash log.

Caused by: java.lang.UnsupportedOperationException: For security reasons, 
WebView is not allowed in privileged processes

For Solution of this issue, we might do the following by removing following 
code checking from 
https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/webkit/WebViewFactory.java
 :

IF we remove the following checking 

final int uid = android.os.Process.myUid(); 
if (uid == android.os.Process.ROOT_UID || uid == android.os.Process.SYSTEM_UID 
|| uid == android.os.Process.PHONE_UID || uid == android.os.Process.NFC_UID 
|| uid == android.os.Process.BLUETOOTH_UID) 
{ throw new UnsupportedOperationException( "For security reasons, WebView 
is not allowed in privileged processes"); 
}
But doing this case raise security concern which never wants to allow So 
can anyone suggest a more feasible solution to un WebView on system app.

-- 
-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

--- 
You received this message because you are subscribed to the Google Groups 
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-porting/eec89286-e5d9-483a-8a20-2fa0bc3040e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to