Merge "Do not allow WebView instantiation from privileged processes."
This commit is contained in:
committed by
Android (Google) Code Review
commit
a9031fe3b5
@@ -198,7 +198,9 @@ public final class WebViewFactory {
|
||||
if (sProviderInstance != null) return sProviderInstance;
|
||||
|
||||
final int uid = android.os.Process.myUid();
|
||||
if (uid == android.os.Process.ROOT_UID || uid == android.os.Process.SYSTEM_UID) {
|
||||
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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user