Merge pull request #819 from brendanzagaeski/patch-1
[mono.git] / mcs / class / System / System.Net / WebRequest.cs
index c6b4ca6ae3ed8130e527eb3e9789818d51a7b604..eeed685db3af763ec2a84aa1f0b8ec177c79d5b2 100644 (file)
@@ -152,10 +152,6 @@ namespace System.Net
                        set { throw GetMustImplement (); }
                }
                
-               public TokenImpersonationLevel ImpersonationLevel {
-                       get { throw GetMustImplement (); }
-                       set { throw GetMustImplement (); }
-               }
 
                public virtual string Method { 
                        get { throw GetMustImplement (); }
@@ -190,7 +186,9 @@ namespace System.Net
                                throw GetMustImplement ();
                        }
                }
-               
+
+               public TokenImpersonationLevel ImpersonationLevel { get; set; }
+
 //             volatile static IWebProxy proxy;
                static readonly object lockobj = new object ();
                
@@ -327,6 +325,12 @@ namespace System.Net
 #if MONOTOUCH
                        return CFNetwork.GetDefaultProxy ();
 #else
+#if MONODROID
+                       // Return the system web proxy.  This only works for ICS+.
+                       var androidProxy = AndroidPlatform.GetDefaultProxy ();
+                       if (androidProxy != null)
+                               return androidProxy;
+#endif
 #if !NET_2_1
                        if (IsWindows ()) {
                                int iProxyEnable = (int)Microsoft.Win32.Registry.GetValue ("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", "ProxyEnable", 0);